Vulnerability · Published Oct 22, 2025 · Assigned by @huntr_ai
CVE-2025-11844XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function
Medium 5.4
In plain English
A medium-severity security flaw in huggingface/smolagents from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
Hugging Face Smolagents version 1.20.0 contains an XPath injection vulnerability in the search_item_ctrl_f function located in src/smolagents/vision_web_browser.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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | smolagents | 1.22.0 | GHSA-8mf9-rmgw-33qc |
| PyPI | smolagents | 1.22.0 | PYSEC-2026-1930 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | huggingface/smolagents | unspecified – before 1.22.0 |
Weakness: CWE-643 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N