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 package | Versions | Reported by |
|---|---|---|
| huggingface huggingface/smolagents | from unspecified before 1.22.0 | CVE List |
| smolagents (PyPI) | before 1.22.0 | GitHub Advisory Database, PyPA Advisory Database |
| huggingface smolagents | from 1.20.0 before 1.22.0 | NVD |
All scores
| @huntr_ai | 5.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| PyPA Advisory Database | 5.4medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-11844 changed 2025-10-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8mf9-rmgw-33qc changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2025-11844 changed 2026-10-08 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1930 changed 2026-07-07 | CC-BY-4.0 |