If your team uses HuggingFace smolagents for any web automation or agentic browsing task, upgrade to v1.22.0 immediately — the fix is one pip install. The risk is not the CVSS score; it is that a malicious webpage can manipulate what your AI agent sees and acts on, turning your automated workflow into an attacker-controlled one. Until patched, restrict agent web access to allowlisted trusted domains.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| smolagents | pip | < 1.22.0 | 1.22.0 |
| smolagents | pip | — | No patch |
Severity & Risk
Recommended Action
- 1) Patch: `pip install smolagents>=1.22.0` — the fix is available and targeted (commit f570ed5e). 2) If patching is blocked, disable vision_web_browser.py usage or gate it behind domain allowlisting. 3) Add input sanitization at the tool interface layer for any XPath-consuming functions. 4) Instrument agent tool calls with logging to detect anomalous DOM query patterns. 5) Review all custom forks or copies of vision_web_browser.py — the issue is in a specific function that may have been copy-pasted. 6) Cross-check huntr PoC (linked in references) against your deployment to confirm exploitability in your specific configuration.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD 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.
Exploitation Scenario
An attacker publishes a legitimate-looking webpage (e.g., a fake CVE summary site, a phishing page, or injected content on a compromised site). A smolagents-based agent browsing the web as part of a research or automation workflow calls `search_item_ctrl_f` to locate specific text. The attacker-controlled page contains XPath injection syntax embedded in visible text elements. The unsanitized input alters the XPath query, causing the function to return unintended DOM nodes — leaking hidden form data, bypassing content visibility filters, or feeding the agent incorrect page context. In a multi-step workflow, the agent proceeds to take actions (clicks, data extraction, report generation) based on this manipulated view.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N References
- huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4 Exploit 3rd Party
- github.com/advisories/GHSA-8mf9-rmgw-33qc
- github.com/huggingface/smolagents/commit/f570ed5e17999d4cf7d5e79c2830fbaefab8a794
- huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4
- nvd.nist.gov/vuln/detail/CVE-2025-11844
- github.com/huggingface/smolagents/commit/f570ed5e17999d4cf7d5e79c2830fbaefab8a794 Patch
- huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4 Exploit 3rd Party