AAK-LANGCHAIN-001: Project depends on langchain-core below 1.2.22 (load_prompt path traversal)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/langchain_vuln.py- Auto-fixable
- Yes.
agent-audit-kit fixcan apply it. - SARIF name
LangchainPathTraversalVuln
What it detects
A Python manifest pins langchain-core, the PyPI distribution CVE-2026-34070 names (GHSA-qh6h-p6c9-ff54), below 1.2.22, or declares a range that admits a release below it. Before that release, load_prompt() and load_prompt_from_config() accept absolute paths and '..' traversal.
How to fix
Upgrade to langchain-core >= 1.2.22. If you must keep the legacy behavior, pass allow_dangerous_paths=True explicitly.
agent-audit-kit fix can apply this change for you; add --dry-run to preview it.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-LANGCHAIN-001
Limitations
Reads langchain-core, in any PEP 503 spelling, from requirements.txt, requirements-dev.txt, requirements-prod.txt and dev-requirements.txt at the project root and from every pyproject.toml, taking the lowest version a range allows. A git reference or an archive is judged by the release its tag or file name names (@langchain-core==1.2.21, langchain_core-1.2.21.tar.gz), with releases compared on their first three numbers, so a pre-release of the fix (langchain-core==1.2.22rc1) reads as the fix. A langchain-core that states no version, a git reference to a commit or a branch included (any name holding a / but refs/tags/<tag>, such as release/1.2.21), is not reported, and a lockfile (uv.lock, poetry.lock) or another requirements file (requirements-test.txt, requirements/base.txt) is not read. npm packages are not read: the advisory names only the PyPI distribution, and npm's @langchain/* packages have version lines of their own. The umbrella langchain and langchain-community distributions are not read either, because their version numbers are not langchain-core's, so a project that pins only those is not reported. Declarations of one install that no release satisfies together (langchain-core==1.2.22 beside langchain-core==1.2.21 in one requirements file) admit nothing and are not reported; pip refuses to install them too. A pyproject.toml that does not parse and a manifest over 2 MB are not read. A pyproject.toml with a key of more than 64 dotted parts, or holding an integer Python cannot convert (one past 4,300 digits), is refused and reported as AAK-INTERNAL-SCANNER-FAIL.
References
- CVE: CVE-2026-34070
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-01 (Runtime Package Fetch)
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-LANGCHAIN-001.md: the page then shows that text, with the registry reference appended under it.