/

CVE-2026-45134

Severity:

HIGH RISK

(7.1)

Unsafe Deserialization in LangSmith Client SDK Prompt Pull

CVE-2026-45134

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Behavior Manipulation via Untrusted Prompt Manifests

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

LangSmith Client SDKs prior to Python 0.8.0 and JS/TS 0.6.0 unsafely deserialize prompt manifests pulled from the LangSmith Hub, which may include serialized LangChain objects and model configurations that influence application behavior.

Because public prompts are controlled by external parties but are treated like trusted, in-organization assets, integrating them can allow untrusted data to shape runtime execution and decision flows in consuming applications.

Affected context

This vulnerability affects applications that:

  • Use the LangSmith Client SDKs (Python or JS/TS) to pull prompts from the LangSmith Hub
  • Rely on pull_prompt / pull_prompt_commit (Python) or pullPrompt / pullPromptCommit (JS/TS) to load prompts
  • Treat public prompts identified by owner/name as if they were trusted, first-party assets
  • Allow the deserialized LangChain objects and model configurations to directly influence runtime behavior (e.g., tool wiring, routing, or model parameters)

The risk is elevated when pulled prompts are integrated into critical workflows without additional validation, review, or isolation.

Exploit preconditions

  • Attack surface: Applications that programmatically pull prompts from the LangSmith Hub using the affected SDK methods.
  • Required access: Ability for an attacker to create or modify a public prompt (or otherwise influence a prompt manifest) that another user pulls by owner/name.
  • Trigger point: A victim application invokes pull_prompt, pull_prompt_commit, pullPrompt, or pullPromptCommit on an untrusted/public prompt and then uses the deserialized objects in its runtime.
  • Why exploitation is possible: The SDKs did not distinguish between trusted in-organization prompts and public, externally controlled prompts. As a result, serialized objects from public manifests are deserialized and treated as trusted configuration and logic, allowing untrusted data to shape execution paths and behavior.

Why this happens

The underlying issue is an unsafe deserialization pattern aligned with CWE-502, where serialized objects from an external source are loaded and trusted without appropriate distinction or validation.

The LangSmith Client SDKs allow prompt manifests to contain serialized LangChain objects and model configuration data. Public prompts hosted on the LangSmith Hub are controlled by external parties, yet the SDKs treated these manifests identically to internal, trusted ones. When the SDK deserializes these objects, it effectively lets outside-controlled data determine how chains, tools, or models are configured and wired. This breaks assumptions about trust boundaries and enables untrusted content to alter application behavior. The bug resides not just in the use of serialization itself, but in failing to enforce a trust separation between internal prompts and public, externally supplied prompts.

Potential impact

  • Untrusted prompts may influence chain structure, tools, or routing logic, which could manipulate how the application processes user inputs.
  • Application behavior could be altered in subtle ways, such as changing which models, tools, or endpoints are used.
  • Security and compliance controls that rely on specific prompt or chain configurations may be bypassed or degraded.
  • Users may unknowingly incorporate externally controlled logic into production workflows, increasing exposure to future prompt or configuration changes.

General mitigation guidance

Effective mitigation focuses on restoring and enforcing clear trust boundaries around serialized prompt manifests and their deserialization:

  • Separate trust levels: Treat public or externally sourced prompts as untrusted by default and handle them differently from internal organization prompts.
  • Restrict deserialization effects: Limit what deserialized objects are allowed to control—avoid letting external content directly drive tool selection, network calls, or privileged operations.
  • Validate manifests: Apply schema validation and structural checks to prompt manifests before accepting them into production workflows, ensuring only expected fields and configurations are used.
  • Introduce review and approval: Require human review or a promotion process before public prompts are integrated into high-value or sensitive workflows.
  • Isolate external prompts: Run chains derived from public prompts within constrained contexts (e.g., restricted capabilities, reduced permissions, or sandboxed execution environments) to minimize possible harm if a manifest is malicious or misconfigured.
  • Favor explicit configuration: Prefer explicit, code-defined configuration for security-sensitive behavior instead of implicitly trusting parameters or structures coming from remote manifests.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using a combination of code-level and process-level controls:

  • Static analysis and code review: Flag usage of pull_prompt, pull_prompt_commit, pullPrompt, and pullPromptCommit where results are directly used in sensitive or privileged flows without checks on prompt origin or trust level.
  • Configuration review: Audit deployments to identify where public prompts are used and confirm that they are subject to additional validation or isolation.
  • Policy enforcement: Establish coding guidelines requiring explicit trust classification for remote prompts and enforce these via code review or automated linting rules.
  • Runtime monitoring: Log which prompts (including their owners and identifiers) are being pulled and from where they are used, enabling detection of unexpected or unauthorized dependencies on public prompts.
  • Tool-assisted scanning: Utilize automated security review tools capable of recognizing unsafe deserialization patterns and untrusted configuration sources in SDK-using codebases, especially around LangChain object reconstruction.

Sources

SourceLink
github.comgithub.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-3644-q5cj-c5c7

Frequently asked

questions

Yes, but indirectly. An attacker must be able to publish or modify a public prompt manifest that a victim application later pulls and uses. There is no direct network exploit against a running process; instead, exploitation flows through the application's voluntary use of external prompts.

The attacker needs the ability to control or influence a prompt manifest that another user fetches by owner/name. This typically means the attacker can create or modify a public prompt on the LangSmith Hub that is then adopted by another organization's application.

The safest pattern is to treat all externally sourced or public prompts as untrusted and to restrict what deserialized objects from these prompts can control. This includes applying strict validation, limiting the capabilities of chains derived from such prompts, and ensuring sensitive logic or privileges are not driven purely by external configuration.

To prevent similar issues, design SDK and application integrations around explicit trust boundaries: avoid blindly deserializing remote content, prefer safe or restricted forms of serialization, and implement approval and validation workflows for any external configuration that can influence runtime behavior. Embedding these rules into development guidelines, code review practices, and automated checks helps catch unsafe patterns early.

Find out what's already
exploitable in your codebase.