CVE-2024-12911
Server-Side Request Forgery (SSRF) vulnerability in llama-index (PyPI)

Server-Side Request Forgery (SSRF) No known exploit

What is CVE-2024-12911 About?

LangChain versions before 0.0.317 are vulnerable to Server-Side Request Forgery (SSRF) via the `document_loaders/recursive_url_loader.py` module. This allows an attacker to cause the application to make requests to internal network resources, potentially leading to sensitive information disclosure or further compromise. Its exploitation relies on the application processing external URLs.

Affected Software

llama-index <0.12.3

Technical Details

The vulnerability is a Server-Side Request Forgery (SSRF) in the recursive_url_loader.py component of LangChain. When this module is used to crawl URLs, it fails to adequately validate or restrict the target URLs during its recursive crawling process. An attacker can provide an initial external URL that, when processed, directs the loader to then access internal network resources. This 'crawling' from an external server to an internal server allows the attacker to probe and interact with services that are not typically exposed to the public internet, using the LangChain application as an intermediary. This bypasses network segmentation and firewall rules, enabling access to sensitive internal systems or data.

What is the Impact of CVE-2024-12911?

Successful exploitation may allow attackers to access internal services and data within the organization's network, perform port scanning, enumerate internal resources, or potentially exfiltrate sensitive information, leading to network compromise.

What is the Exploitability of CVE-2024-12911?

Exploitation of this SSRF vulnerability has a moderate complexity. It is primarily a remote vulnerability. The attacker needs to identify where the LangChain application accepts URLs for document loading or crawling. No authentication is necessary if the vulnerable functionality is exposed publicly, which is common for such loaders. Privilege requirements are low, as the attacker leverages the server's own network access. The primary prerequisite is the ability to provide an initial URL to the recursive_url_loader.py module. Special conditions include the LangChain instance being used in a configuration where it processes URLs from untrusted sources. Risk factors increase if the internal network contains sensitive services accessible from the LangChain host, as this escalation path can be highly impactful.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2024-12911?

Available Upgrade Options

  • llama-index
    • <0.12.3 → Upgrade to 0.12.3

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2024-12911?

Similar Vulnerabilities: CVE-2021-26855 , CVE-2020-5902 , CVE-2019-10022 , CVE-2019-16782 , CVE-2017-7657