CVE-2025-11844

GHSA-8mf9-rmgw-33qc MEDIUM
Published October 22, 2025
CISO Take

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

CVSS 3.1
5.4 / 10
EPSS
0.0%
chance of exploitation in 30 days
KEV Status
Not in KEV
Sophistication
Trivial

Recommended Action

  1. 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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6 - AI system security
NIST AI RMF
MS-2.5 - Manage AI risks from third-party entities
OWASP LLM Top 10
LLM07 - Insecure Plugin Design

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.

CVSS Vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Timeline

Published
October 22, 2025
Last Modified
October 30, 2025
First Seen
October 22, 2025