# CVE-2026-59152: Arbitrary server-side file read in LangSmith SDK TracingMiddleware

> An attacker can force a server using LangSmith SDK TracingMiddleware to read arbitrary local files and exfiltrate them to a LangSmith workspace.

- **Severity:** Medium 5.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 6 Jul 2026
- **Updated:** 7 Jul 2026
- **Also known as:** CLEANSTART-2026-DI87779, CLEANSTART-2026-EU68751, CLEANSTART-2026-TL07655, ECHO-981d-76df-3620, GHSA-f4xh-w4cj-qxq8, ROOT-APP-PYPI-GHSA-f4xh-w4cj-qxq8

## What is CVE-2026-59152?

CVE-2026-59152 is a medium-severity path traversal vulnerability in langchain-ai langsmith-sdk, published on 6 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

LangSmith Client SDKs provide SDK's for interacting with the LangSmith platform. Prior to 0.8.18, an attacker who can send an HTTP request to a server running the LangSmith SDK's TracingMiddleware can cause that server to read an arbitrary file from its local filesystem and upload the contents to LangSmith as a trace attachment. Depending on how the distributed trace system is deployed, triggering a read may not require authentication. Retrieving the contents requires read access to the LangSmith workspace the traces are sent to. The net effect is a trust-boundary crossing: a party with workspace trace-read access (for example a low-privilege workspace member, a contractor, or a compromised teammate account) gains the ability to read files from any server running TracingMiddleware, a capability outside that workspace's intended trust boundary. This vulnerability is fixed in 0.8.18.

Weakness: CWE-843 (Access of Resource Using Incompatible Type), CWE-346 (Origin Validation Error), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-59152?

2 open source packages ship an affected version, including langsmith.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `langsmith` | PyPI | All versions | 0.8.18 |
| `langsmith` | PyPI | All versions | 0.8.18 |

## How do I fix CVE-2026-59152?

Upgrade langsmith to 0.8.18 or later.

## Is CVE-2026-59152 being exploited?

There is no known exploitation of CVE-2026-59152 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-59152 and fix it if it is affected.

What it is: CVE-2026-59152 is a medium-severity path traversal vulnerability in langchain-ai langsmith-sdk, published on 6 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-59152 in the wild and no public exploit code.

Affected packages and fixed versions:
- langsmith (PyPI): affected all versions; fixed in 0.8.18
- langsmith (PyPI): affected all versions; fixed in 0.8.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-59152/ (Markdown: https://insights.sbomify.com/CVE-2026-59152/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-59152
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-59152
- OSV: https://osv.dev/vulnerability/CVE-2026-59152

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-59152/
Summaries are generated and may contain mistakes; the official description above is the record.
