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.
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
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Wed, 22 Oct 2025 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 22 Oct 2025 13:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2025-10-22T14:09:51.303Z

Reserved: 2025-10-16T09:30:14.323Z

Link: CVE-2025-11844

cve-icon Vulnrichment

Updated: 2025-10-22T14:07:34.354Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2025-10-22T14:15:49.457

Modified: 2025-10-22T21:12:48.953

Link: CVE-2025-11844

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.