XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| huggingface | huggingface/smolagents | before 1.22.0 | 1.22.0 | Patch available | CNA |
| — | smolagents (PyPI) | before 1.22.0 | 1.22.0 | Patch available | GHSA-8mf9-rmgw-33qc |
- huggingface/smolagents Vendorhuggingface Affected before 1.22.0 Fixed in 1.22.0 Patch available CNA
- smolagents (PyPI) Vendor— Affected before 1.22.0 Fixed in 1.22.0 Patch available GHSA-8mf9-rmgw-33qc
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:huggingface:smolagents:*:*:*:*:*:*:*:* | 1.20.0 to before 1.22.0 | Vulnerable | huggingface |
- cpe:2.3:a:huggingface:smolagents:*:*:*:*:*:*:*:* Versions 1.20.0 to before 1.22.0 Vulnerable ·huggingface
Remediation
- Fix · CNA huggingface/smolagents (huggingface) Fixed in 1.22.0
- Fix · GHSA-8mf9-rmgw-33qc smolagents (PyPI) Fixed in 1.22.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-11844
- 2026-10-03 Alias added: GHSA-8mf9-rmgw-33qc
References
More huggingface Smolagents vulnerabilities
- TI-2025-04589 Sandbox Escape Vulnerability in huggingface/smolagents CVSS 3.1CRITICAL 10.0
- TI-2026-04324 huggingface smolagents Incomplete Fix CVE-2025-9959 local_python_executor.py evaluate_with code injection CVSS 4.0MEDIUM 5.3
- TI-2026-02266 huggingface smolagents LocalPythonExecutor requests.post server-side request forgery CVSS 4.0MEDIUM 5.3
Sources
- CVE-2025-11844 · CVE Program
- CVE-2025-11844 · NVD
- FIRST EPSS
- GHSA-8mf9-rmgw-33qc · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences