LlamaIndex has an XML Entity Expansion vulnerability in its sitemap parser
The sitemap parser in LlamaIndex's Papers Loaders package was vulnerable to XML entity expansion (a 'billion laughs' attack). An attacker could supply a malicious Sitemap XML to exhaust system memory and cause a denial of service or crash.
run-llama/llama_index
Originally disclosed on huntr
An XML Entity Expansion vulnerability, also known as a 'billion laughs' attack, exists in the sitemap parser of the run-llama/llama_index repository, specifically affecting the Papers Loaders package before version 0.3.2 (in llama-index v0.10.0 and above through v0.12.29). This vulnerability allows an attacker to supply a malicious Sitemap XML, leading to a Denial of Service (DoS) by exhausting system memory and potentially causing a system crash. The issue is resolved in version 0.3.2 (in llama-index 0.12.29).
From the GitHub Advisory Database (GHSA-w42r-mrx7-c633, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser used for sitemaps did not disable custom entity expansion, allowing nested entity definitions to multiply.
Impact
An attacker could cause a denial of service by exhausting memory, potentially crashing the system.
What the attacker needed
Ability to supply a malicious sitemap XML
The fix
The issue was fixed in version 0.3.2 of the Papers Loaders package (llama-index 0.12.29).
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
XML files can define shortcuts called entities that expand into text. A 'billion laughs' attack nests these definitions so that a tiny file expands into a huge amount of text, using up all the computer's memory. Here, a sitemap parser accepted such a file, so a malicious sitemap could crash the system.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.