LangChain's XMLOutputParser vulnerable to XML Entity Expansion
Published 26 Mar 2024 · Updated 7 Jul 2026
Is your project on an affected langchain-core?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <0.1.35
- Fixed in
- 0.1.35
pip install 'langchain-core>=0.1.35'Details
The XMLOutputParser in LangChain uses the etree module from the XML parser in the standard python library which has some XML vulnerabilities; see: https://docs.python.org/3/library/xml.html
This primarily affects users that combine an LLM (or agent) with the XMLOutputParser and expose the component via an endpoint on a web-service.
This would allow a malicious party to attempt to manipulate the LLM to produce a malicious payload for the parser that would compromise the availability of the service.
A successful attack is predicated on:
1. Usage of XMLOutputParser 2. Passing of malicious input into the XMLOutputParser either directly or by trying to manipulate an LLM to do so on the users behalf 3. Exposing the component via a web-service
Is GHSA-q84m-rmw3-4382 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected langchain-core, and gives you the command that fixes it.
More advisories for langchain-core
- HighCVE-2026-44843LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlists · 8 May 2026
- MediumCVE-2026-40087LangChain has incomplete f-string validation in prompt templates · 8 Apr 2026
- HighCVE-2026-34070LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions · 27 Mar 2026
- LowCVE-2026-26013LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages · 11 Feb 2026
- CriticalCVE-2025-68664LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs · 23 Dec 2025
- HighCVE-2025-65106LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates · 20 Nov 2025
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-1455
- Linkgithub.com/langchain-ai/langchain/pull/17250
- Linkgithub.com/langchain-ai/langchain/pull/19653
- Linkgithub.com/langchain-ai/langchain/pull/19660
- Linkgithub.com/langchain-ai/langchain/commit/727d5023ce88e18e3074ef620a98137d26ff92a3
- Packagegithub.com/langchain-ai/langchain
- Linkhuntr.com/bounties/4353571f-c70d-4bfd-ac08-3a89cecb45b6
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.