---
schema_version: '1.0'
id: security-20260711-e59ea6
url: https://osv.dev/vulnerability/GHSA-f4xh-w4cj-qxq8
url_hash: e59ea6e50f49da7b6c8cc4ee9d68a83e9406f15dc6320a85108a0a9ed3260128
canonical_url: https://osv.dev/vulnerability/GHSA-f4xh-w4cj-qxq8
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-59152
- GHSA-f4xh-w4cj-qxq8
- severity:CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
- langsmith
- PyPI
lang: en
published_at: '2026-06-19T22:10:34Z'
fetched_at: '2026-07-11T06:37:17Z'
updated_at: '2026-07-11T06:39:11Z'
status: published
content_hash: 4567cafdb94b4d6bf24f82b9f6945aa0778358060a495b2471df73d169edd0c5
license_note: full
summary: 'LangSmith SDK TracingMiddleware: Arbitrary server-side file read'
summary_source: rss
summary_en: 'LangSmith SDK TracingMiddleware: Arbitrary server-side file read'
entities:
- name: Akida SDK
  type: artifact
key_facts: []
related: []
related_auto: []
title: 'CVE-2026-59152: LangSmith SDK TracingMiddleware: Arbitrary server-side file
  read'
---

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

## TL;DR
LangSmith SDK TracingMiddleware: Arbitrary server-side file read

## Key Points
- cve / CVE-2026-59152 / GHSA-f4xh-w4cj-qxq8 / severity:CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N / langsmith / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
**Advisory:** GHSA-f4xh-w4cj-qxq8 (CVE-2026-59152)

**Affected (your watchlist):**
- `PyPI:langsmith` 0.8.15 → fixed in 0.8.18 [docker/local]

**Details:**
# Summary

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.

# Impact

Confidentiality (High): arbitrary read of files accessible to the server process, exposed to anyone with workspace trace-read access.

# Details

Two defects combine. A field supplied through a tracing-propagation header was merged into the run without validation, allowing injection of run attributes including attachments (CWE-346). A type check intended to gate filesystem access did not match the type of the decoded input, so the guard never engaged (CWE-843). As a result, an attacker-named file is opened by the server and uploaded as a trace attachment by the background tracing thread (CWE-22).

## Who can exploit this

- Anyone reachable by HTTP can trigger the file read. Depending on how the distributed trace system is deployed, triggering may not require authentication.
- Retrieving the file contents requires read access to the destination LangSmith workspace. The upload uses the server's own configured API key and workspace, which the attacker cannot redirect, so a zero-access outsider cannot retrieve the result; a workspace member, or anyone who has compromised one, can.

# Remediation

Upgrade the Python SDK to `>= 0.8.18`.

# Workarounds

Until upgrading, do not expose `TracingMiddleware` to untrusted HTTP traffic, and limit workspace trace-read access to trusted members.

# Credits

First reported by @Ryu7zz.

**References:**
- https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-f4xh-w4cj-qxq8
- https://github.com/langchain-ai/langsmith-sdk

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-f4xh-w4cj-qxq8_

## Source
元記事: [CVE-2026-59152: LangSmith SDK TracingMiddleware: Arbitrary server-side file read](https://osv.dev/vulnerability/GHSA-f4xh-w4cj-qxq8) — published 2026-06-19T22:10:34Z
