Skip to content

[Aikido] Fix 11 security issues in langsmith, form-data, uuid and 1 more - #29

Closed
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-82139630-tqfl
Closed

[Aikido] Fix 11 security issues in langsmith, form-data, uuid and 1 more#29
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-82139630-tqfl

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Aug 6, 2026

Copy link
Copy Markdown

Upgrade langsmith, form-data, uuid, and brace-expansion to fix prototype pollution, CRLF injection, buffer overflow, and untrusted deserialization vulnerabilities.

⚠️ Incomplete breaking changes analysis (3/4 analyzed)

⚠️ Breaking changes analysis not available for: langsmith

langsmith (0.2.5 => 0.6.0): This codebase does not directly import or use the langsmith package. It only appears as a transitive dependency through langchain, which is used as a peer dependency in langfuse-langchain and as a dev dependency for testing. The breaking changes in langsmith (removal of legacy evaluators, AI SDK exporter, wrapAIModel, and pydantic v2 bump) do not affect this codebase.

uuid (10.0.0 => 11.1.1): This codebase does not directly import or use the uuid package. All UUID generation uses Node.js's built-in crypto.randomUUID() function. The uuid package only appears as a transitive dependency through langchain. The breaking changes in uuid v11 (refactored v1/v7 internal state, TypeScript port, and Node 16-20 support) do not affect this codebase. Additionally, the codebase requires Node >=18, which is within uuid v11's supported range.

All breaking changes by upgrading uuid from version 10.0.0 to 14.0.1 (CHANGELOG)

Version Description
11.0.0
Refactored v1 internal state and options logic
11.0.0
Refactored v7 internal state and options logic
11.0.0
Ported to TypeScript
11.0.0
Updated node support matrix to only support node 16-20
12.0.0
Updated to typescript@5.2
12.0.0
Removed CommonJS support
12.0.0
Dropped node@16 support
13.0.0
Made browser exports the default
14.0.0
crypto is now expected to be globally defined (requires node@20+)
14.0.0
Dropped node@18 support
14.0.0
Upgraded minimum supported TypeScript version to 5.4.3
14.0.0
v3(), v5(), and v6() now throw a RangeError if offset < 0 or offset + 16 > buf.length (previously allowed out-of-bounds writes with invalid offset)

All breaking changes by upgrading brace-expansion from version 2.0.1 to 5.0.9 (CHANGELOG)

Version Description
3.0.0
Switch to ES Modules and balanced-match 3.0.0
✅ 11 CVEs resolved by this upgrade, including 2 critical 🚨 CVEs

This PR will resolve the following CVEs:

Issue Severity           Description
CVE-2026-40190
🚨 CRITICAL
[langsmith] Incomplete prototype pollution fix in vendored lodash allows attackers to pollute Object.prototype via constructor.prototype traversal when processing data through the createAnonymizer() API, affecting all objects in the Node.js process.
CVE-2026-45134
HIGH
[langsmith] Prompt pull methods deserialize untrusted manifest data from public prompts without validation, allowing attackers to inject malicious LangChain objects and configurations that execute arbitrary code during deserialization (RCE).
CVE-2026-41182
MEDIUM
[langsmith] Output redaction controls fail to apply to streaming token events, allowing sensitive LLM output to bypass redaction and leak via run events in LangSmith. This information disclosure vulnerability affects applications relying on redaction to prevent sensitive data storage.
CVE-2025-7783
🚨 CRITICAL
[form-data] Use of Insufficiently Random Values vulnerability in form-data allows HTTP Parameter Pollution (HPP). This vulnerability is associated with program files lib/form_data.Js.

This issue affects form-data: < 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3.
CVE-2026-12143
HIGH
[form-data] A CRLF injection vulnerability in the field and filename arguments allows attackers to inject headers or multipart parts into requests, potentially enabling form field manipulation or bypass attacks when untrusted input is used as field names or filenames.
CVE-2026-41907
HIGH
[uuid] A buffer overflow vulnerability allows v3, v5, and v6 UUID functions to write beyond caller-provided buffer boundaries when given small buffers or large offsets, causing silent data corruption. This can lead to memory corruption and potential code execution or information disclosure.
CVE-2026-14257
HIGH
[brace-expansion] Denial of service via memory exhaustion when expand() processes chained brace groups, allowing attackers to crash applications with small inputs by generating progressively longer result strings that exceed memory limits.
CVE-2026-69152
HIGH
[brace-expansion] A memory exhaustion and event loop blocking vulnerability exists in the expand() function when processing attacker-controlled input with comma-alternatives or padded sequences, bypassing previous DoS protections.
CVE-2026-13149
MEDIUM
[brace-expansion] A denial of service vulnerability exists in the expand() function due to exponential-time complexity when processing consecutive non-expanding brace groups, allowing attackers to cause significant CPU consumption and event-loop blocking.
CVE-2026-33750
LOW
[brace-expansion] A brace pattern with zero step value causes an infinite loop, leading to denial of service through process hangs and excessive memory allocation. The vulnerability affects string expansion operations when malicious or malformed patterns are processed.
CVE-2025-5889
LOW
[brace-expansion] A regular expression complexity vulnerability in the expand function allows remote attackers to cause denial of service through inefficient regex processing, though exploitation is difficult and requires high attack complexity.

Note

Medium Risk
LangChain 0.3→1.x is a major upgrade for integration tests and langfuse-langchain compatibility; transitive security pins may affect Node/uuid behavior in downstream installs.

Overview
Bumps LangChain from 0.3 to ^1.2.2 and @langchain/core / @langchain/community to 1.x in the root devDependencies and integration-test/modules, aligning integration tests with LangChain’s major release line.

Also upgrades lerna (8 → 9), @opentelemetry/auto-instrumentations-node (0.50 → 0.76), and adds a Yarn resolutions entry forcing brace-expansion 5.0.9 so transitive installs pick up patched versions (per the security remediation for langsmith, form-data, uuid, and brace-expansion—typically via lockfile updates not shown in this diff).

Review focus: LangChain 1.x can break LangChain integration tests and any APIs that still assume 0.3; confirm yarn test:langchain / test:modules after install.

Reviewed by Cursor Bugbot for commit bcdc272. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bcdc272. Configure here.

Comment thread package.json
"@langchain/core": "^0.3.3",
"@opentelemetry/auto-instrumentations-node": "^0.50.0",
"@langchain/core": "^1.1.29",
"@opentelemetry/auto-instrumentations-node": "^0.76.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incompatible OpenTelemetry package versions

High Severity

@opentelemetry/auto-instrumentations-node was bumped to ^0.76.0, which targets OpenTelemetry JS SDK 2.0 and depends on @opentelemetry/sdk-node ^0.218.0, while @opentelemetry/sdk-node stays at ^0.53.0. The Vercel integration test constructs NodeSDK with instrumentations from that newer package, so tracing setup can fail or behave incorrectly at runtime.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bcdc272. Configure here.

Comment thread package.json
"jest-environment-jsdom": "^29.6.2",
"langchain": "^0.3",
"lerna": "^8.1.8",
"langchain": "^1.2.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LangChain 1.x breaks ConversationChain import

High Severity

langchain is upgraded to ^1.2.2, but integration tests still import ConversationChain from langchain/chains. In LangChain JS v1 that API moved to @langchain/classic, and langchain@1.5.4 no longer ships a chains entrypoint, so the LangChain integration suite fails on import.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bcdc272. Configure here.

Comment thread package.json
"jest-environment-jsdom": "^29.6.2",
"langchain": "^0.3",
"lerna": "^8.1.8",
"langchain": "^1.2.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale langchain peer dependency range

Medium Severity

The monorepo now installs langchain ^1.2.2, but langfuse-langchain still declares a peer range of >=0.0.157 &lt;0.4.0. That leaves an unmet peer dependency in the workspace and advertises that LangChain 1.x is unsupported even though tests now target it.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bcdc272. Configure here.

Comment thread package.json
"@babel/preset-typescript": "^7.24.7",
"@langchain/core": "^0.3.3",
"@opentelemetry/auto-instrumentations-node": "^0.50.0",
"@langchain/core": "^1.1.29",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node engine understates new requirements

Medium Severity

engines.node remains >=18, and CI still matrices Node 18, but the upgrade pulls uuid@14 via @langchain/community and LangChain 1.x, both of which require Node 20+. On Node 18, install/runtime support for those packages is outside their supported matrix.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bcdc272. Configure here.

@aikido-autofix

Copy link
Copy Markdown
Author

Closed by Aikido: a new AutoFix has been created → #39

@aikido-autofix aikido-autofix Bot closed this Aug 29, 2026
@aikido-autofix
aikido-autofix Bot deleted the fix/aikido-security-update-packages-82139630-tqfl branch August 29, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants