Executive brief
The LangSmith SDK, used for monitoring and tracing AI applications, contains a vulnerability in its TracingMiddleware component. An attacker can send a specially crafted web request that forces the server to read sensitive local files and upload them to the LangSmith monitoring platform. While the attacker needs access to the LangSmith workspace to view the stolen files, this allows low-privileged users or contractors to access server data they should not be able to see.
Technical details
A path traversal vulnerability (CWE-22) exists in the LangSmith SDK's TracingMiddleware due to improper validation of tracing-propagation headers. Two defects contribute to the flaw: first, header fields are merged into trace runs without validation (CWE-346), and second, a type check intended to restrict filesystem access fails because of a type mismatch between decoded input and the guard (CWE-843). An attacker can trigger the server to open an arbitrary file and upload it as a trace attachment using the server's own API key. While triggering the read may be unauthenticated depending on deployment, retrieving the file contents requires read access to the destination LangSmith workspace. The issue is fixed in version 0.8.18.
Affected products
- langchain-ai langsmith-sdk < 0.8.18
Timeline
- 2026-06-19: advisory: GitHub advisory published by maintainers
- 2026-07-06: disclosed: NVD publication date
- 2026-08-18: patched: Fixed in version 0.8.18