CVE-2025-11844
JSON

5.4medium

XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function

Severity
5.4medium CVSS:3.0 by @huntr_ai
Exploit likelihood
0.28% (higher than 22% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-8mf9-rmgw-33qcPYSEC-2026-1930

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.

Affected

Product or packageVersionsReported by
huggingface huggingface/smolagentsfrom unspecified before 1.22.0CVE List
smolagents (PyPI)before 1.22.0GitHub Advisory Database, PyPA Advisory Database
huggingface smolagentsfrom 1.20.0 before 1.22.0NVD

All scores

@huntr_ai5.4medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub5.4medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
PyPA Advisory Database5.4medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Classification

CWE-643

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Hugging Face Smolagents versión 1.20.0 contiene una vulnerabilidad de inyección XPath en la función search_item_ctrl_f ubicada en src/smolagents/vision_web_browser.py. La función construye una consulta XPath al concatenar directamente la entrada proporcionada por el usuario en la expresión XPath sin una sanitización o escape adecuados. Esto permite a un atacante inyectar sintaxis XPath maliciosa que puede alterar la lógica de consulta prevista. La vulnerabilidad permite a los atacantes eludir los filtros de búsqueda, acceder a elementos DOM no deseados y perturbar los flujos de trabajo de automatización web. Esto puede conducir a la revelación de información, la manipulación de las interacciones de los agentes de IA y comprometer la fiabilidad de las tareas web automatizadas. El problema se corrige en la versión 1.22.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-11844 changed 2025-10-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-8mf9-rmgw-33qc changed 2026-07-07CC-BY-4.0
NVDCVE-2025-11844 changed 2026-10-08Public domain
PyPA Advisory DatabasePYSEC-2026-1930 changed 2026-07-07CC-BY-4.0