langchain-ai/langchain
cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*
- 0.3.63
A vulnerability in the EverNoteLoader component of the langchain-ai/langchain project, specifically in version 0.3.63, allows for XML External Entity (XXE) attacks. This issue arises from insecure XML parsing, as the etree.iterparse() function is used without disabling external entity references. An attacker could exploit this vulnerability by crafting a malicious XML payload that references local files, potentially disclosing sensitive information such as the /etc/passwd file.
Exploitation of this vulnerability could lead to unauthorized access to sensitive information, such as the contents of local files like /etc/passwd, and could also disrupt system availability through XML bomb attacks.
The vulnerability can be reproduced by using the EverNoteLoader to parse a crafted XML file that includes an external entity reference. The loader will process the file without properly sanitizing the XML, allowing the referenced local file to be accessed and its contents exposed.
To address this vulnerability, update the XML parsing code in the EverNoteLoader component to include the resolve_entities=False parameter in the etree.iterparse() function. This change will disable the processing of external entity references, mitigating the risk of XXE attacks.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.