Validated Research Published: Aug 5, 2026

LangSmith Tracing Header Injection Turned Observability Metadata into a Data Route

CVE-2026-25528 affected applications that passed untrusted HTTP tracing headers into the LangSmith SDK. A crafted baggage header could add an attacker-controlled replica URL; when a traced operation finished, the SDK sent run data to that destination. Inputs, outputs, and application metadata could therefore leave through a feature intended for observability. The flaw shows that tracing context is active routing authority, not harmless metadata.

Data ExfiltrationInput ValidationSink EnforcementAI InfrastructureSaaS Security
4 applicable AIDEFEND defenses
Source: Server-Side Request Forgery via Tracing Header Injection 
Author: Angus Jelinek
Original article: Feb 9, 2026

Threat Analysis

  • The vulnerable condition was untrusted header propagation. Applications were exposed when TracingMiddleware accepted public request headers, or code passed them to RunTree.from_headers() or RunTree.fromHeaders(). Using LangSmith without that path was not enough.
  • The baggage header carried destination authority. An attacker could add a replica object containing an api_url. Vulnerable SDK versions stored it as tracing configuration, then post() and patch() sent run data to the injected URL after the traced work completed. The same control could target an internal URL as SSRF.
  • The fix removed unsafe inherited fields. Python versions from 0.4.10 to below 0.6.3 and npm versions from 0.3.41 to below 0.4.6 were affected. Fixed SDKs allowlist safe replica fields and discard caller-controlled destination and credential fields.
  • The evidence does not prove a specific secret was stolen. A secret is exposed only if it was present in the exported run. There is currently no public evidence that this method has been used in an actual attack.

Applicable AIDEFEND Defenses (4)

AID-H-003.010
Deployed AI Software Vulnerability Remediation Lifecycle
Very High
Inventory the Python and npm LangSmith SDK versions actually loaded by each service, rebuild on the current supported releases, stage rollout, and use runtime or image readback to prove vulnerable packages have exited. This removes the SDK behavior that accepted a caller-controlled replica destination.
AID-H-032.003
Inference Telemetry & Debug Surface Restriction
High
Before any trace leaves the inference service, suppress or redact prompts, outputs, retrieved context, tool arguments, secrets, and unnecessary metadata, then fail closed if the exporter cannot prove the policy is active. This reduces what an injected or misconfigured destination can receive, but it does not repair destination selection.
AID-I-002.002
Secure External AI Service Connectivity
High
Give tracing workloads default-deny egress and allow only approved LangSmith endpoints through verified DNS and SNI policy. An attacker-controlled replica URL, or an internal metadata destination, then fails at a network boundary independent of the SDK parser.
AID-H-002.002
Inference-Time Prompt & Input Validation
Medium
At request ingress, parse baggage with a strict schema and a safe-field allowlist, reject unknown replica fields, and remove caller-controlled api_url, api_key, or equivalent authority before tracing context is created. This is structured-header validation, not a prompt-injection filter.

What Defenders Should Do Now

  • Upgrade every Python and TypeScript LangSmith SDK to a current supported release, and verify the version actually loaded in each deployed image or process.
  • Find all uses of TracingMiddleware, RunTree.from_headers(), and RunTree.fromHeaders(). Strip untrusted baggage fields before those calls, or avoid propagating public request headers into tracing context.
  • Allow tracing exporters to reach only approved LangSmith endpoints. Block cloud metadata, private management ranges, and arbitrary Internet destinations from the tracing workload.
  • Review which prompts, responses, retrieved documents, tool arguments, user identifiers, and secrets enter run data. Redact or suppress fields before export and test fail-closed behavior.
  • Search historical egress and trace configuration for unfamiliar replica destinations. Rotate only a specific credential shown by evidence to have appeared in redirected traces.

Conclusion

The defect crossed two boundaries that observability code often blurs: request context decided where data would go, and rich AI run data left the service as routine telemetry. AIDEFEND  maps this case to four separate controls: deploy the fixed SDK, remove routing authority from untrusted headers, minimize trace contents before export, and enforce destination policy outside the process. Tracing metadata should describe a request, never grant it a new network route.