Skip to content
SSRF Write-up Advanced

Cve 2026 44843 One Chat Message Steals Your Credentials Then It Gets Worse

LangChain's tracer deserialised attacker-controlled chat input with allowed_objects='all', reviving a HubRunnable class whose constructor made an outbound HTTP request carrying the server's LangSmith API key. The stolen key gave workspace-wide access, including the ability to overwrite production prompts fetched at runtime.

Dewank Pant Follow

Published on infosecwriteups.com

Some vulnerabilities only become obvious when you stop looking at the model and start looking at the machinery around it.

Dewank Pant, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The tracer called the deserialiser with allowed_objects='all' on runtime data that could contain attacker-supplied structured input, allowing a registered class with network side effects in its constructor to be instantiated.

Impact

An unauthenticated attacker could steal the server's LangSmith API key and then read all trace data, write to the Prompt Hub, and overwrite production prompts, potentially controlling every subsequent model response.

What the attacker needed

Public LangServe-style endpoint; affected langchain-core version; LANGSMITH_API_KEY in environment

The fix

The issue was fixed in langchain-core 1.3.3 and 0.3.85 by narrowing the deserialisation sink so broad object revival is not implicitly applied to attacker-controllable runtime payloads.

How it was found

  1. Send a chat message containing a serialised HubRunnable constructor dictionary with an attacker-controlled api_url and no api_key.
  2. The structured input is preserved as runtime data on run.inputs.
  3. The tracer calls load() with allowed_objects='all', reviving HubRunnable.
  4. HubRunnable's constructor calls pull(), which builds a LangSmith client.
  5. The client falls back to the server's LANGSMITH_API_KEY and sends it in an x-api-key header to the attacker's URL.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

LangChain is a framework for building AI applications. Its tracer records what happens during a request, and to do that it sometimes turns stored data back into live objects. The bug was that a user's chat message could be stored as data and later turned back into a live object that made a network request, leaking a secret key.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by Dewank Pant

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.