fix: Fix 14 security issues in @langchain/community, jsonpath, mailparser and 9 more - #26391
fix: Fix 14 security issues in @langchain/community, jsonpath, mailparser and 9 more#26391aikido-autofix[bot] wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant Client as External User / Attacker
participant LC as @langchain/community
participant Parsers as Parsers (jsonpath, fast-xml, mail)
participant SQL as Database (mysql2)
participant Net as Network / File System (zx)
participant Trace as Tracing (LangSmith)
Note over Client,Trace: Runtime security flow changes (vulnerability mitigations)
Client->>LC: Send Request (Payload: XML, SQL params, Glob, or URLs)
rect rgb(23, 37, 84)
Note right of LC: Input Processing & Validation
alt SQL Execution
LC->>SQL: CHANGED: Execute parameterized query
SQL->>SQL: CHANGED: Apply type-consistent escaping
SQL-->>LC: Safe result (Mitigates SQL Injection)
else Data Extraction (jsonpath)
LC->>Parsers: CHANGED: value(path, data)
Parsers->>Parsers: CHANGED: Block __proto__ / constructor keys
Parsers-->>LC: Sanitized object (Mitigates Prototype Pollution)
else Web Scraping (RecursiveUrlLoader)
LC->>Net: CHANGED: Follow redirects
Net->>Net: CHANGED: Validate redirect target against base URL
Net-->>LC: Remote content (Mitigates SSRF/Internal Access)
else Pattern Matching (minimatch/glob)
LC->>LC: CHANGED: Evaluate glob pattern
LC->>LC: CHANGED: Limit recursive backtracking in regex
Note right of LC: Prevents ReDoS event-loop hang
else XML Processing
LC->>Parsers: CHANGED: Parse with preserveOrder: true
Parsers->>Parsers: CHANGED: Apply recursion depth limits
Parsers-->>LC: Document tree (Mitigates Stack Overflow DoS)
end
end
opt Distributed Tracing
Client->>LC: Request with 'baggage' headers
LC->>LC: CHANGED: Validate 'api_url' in headers
LC->>Trace: Send trace data to verified endpoint
Note right of LC: Prevents data exfiltration (SSRF)
end
LC->>Client: Return Response (CHANGED: HTML URLs/links escaped for XSS)
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Hey @aikido-autofix[bot], Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request. Before we can proceed, please ensure the following: Regarding new nodes: If your node integrates with an AI service that you own or represent, please email nodes@n8n.io and we will be happy to discuss the best approach. About review timelines: Thank you again for contributing to n8n. |
Upgrade dependencies to fix XSS in URL escaping, SQL injection via type-dependent escaping, ReDoS in glob patterns, XML stack overflow, and prototype pollution vulnerabilities.
✅ 14 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
preserveOrder:truecauses stack overflow leading to denial of service. The vulnerability allows attackers to crash the application by triggering recursive processing of malformed XML structures.basicAuthandbearerAuthmiddlewares used non-timing-safe string comparison for hash validation, potentially allowing timing-based analysis attacks to bypass authentication under controlled conditions.document.currentScriptanddocument.baseURI, potentially redirecting script imports to arbitrary URLs and enabling XSS or code execution.🔗 Related Tasks