CVE-2025-11844: XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function
Hugging Face Smolagents version 1.20.0 contains an XPath injection vulnerability in the searchitemctrlf function located in src/smolagents/visionwebbrowser.py. The function constructs an XPath query by directly concatenating user-supplied input into the XPath expression without proper sanitization or escaping. This allows an attacker to inject malicious XPath syntax that can alter the intended query logic. The vulnerability enables attackers to bypass search filters, access unintended DOM elements, and disrupt web automation workflows. This can lead to information disclosure, manipulation of AI agent interactions, and compromise the reliability of automated web tasks. The issue is fixed in version 1.22.0.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-11844?
CVE-2025-11844 has a moderate severity due to an XPath injection vulnerability that may allow arbitrary data retrieval.
How do I fix CVE-2025-11844?
To fix CVE-2025-11844, update Hugging Face Smolagents to a version higher than 1.22.0.
What versions of Hugging Face Smolagents are affected by CVE-2025-11844?
Versions of Hugging Face Smolagents from 1.20.0 up to 1.22.0 are affected by CVE-2025-11844.
What type of vulnerability is CVE-2025-11844?
CVE-2025-11844 is an XPath injection vulnerability in the search_item_ctrl_f function.
Where is the XPath injection vulnerability found in CVE-2025-11844?
The XPath injection vulnerability in CVE-2025-11844 is located in the src/smolagents/vision_web_browser.py file.