CVE-2025-11844

XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function

Published Oct 22, 2025 CVSS 3.0 · 5.4 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8mf9-rmgw-33qc Hugging Face Smolagents XPath injection vulnerability in the search_item_ctrl_f function
History
Type Values Removed Values Added
CPEs cpe:2.3:a:huggingface:smolagents:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Huggingface
Huggingface smolagents
Vendors & Products Huggingface
Huggingface smolagents
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function
Weaknesses CWE-643
References
Metrics cvssV3_0

{'score': 5.4, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Oct 22, 2025, 2:09 PM
Reserved
Oct 16, 2025, 9:30 AM
Status
Analyzed
Published
Oct 22, 2025, 2:15 PM
Modified
Oct 8, 2026, 11:10 AM