Hugging Face Smolagents XPath injection vulnerability in the search_item_ctrl_f function
CVE-2025-11844 · GHSA-8mf9-rmgw-33qc · published 2025-10-22
- Severity
- Medium
- CVSS score
- 5.4
- Chance of exploitation (EPSS)
- 0.28%
- Fixed in
- 1.22.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Hugging Face Smolagents version 1.20.0 contains an XPath injection vulnerability in the searchitemctrlf function located in src/smolagents/visionweb_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.
Upgrade smolagents to 1.22.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| smolagents | PyPI | < 1.22.0 | 1.22.0 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8n, n8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- CriticalHugging Face smolagents: Unsafe deserialization in Remote Python Executor leads to RCEsmolagents
- Criticalsmolagents has Sandbox Escape Vulnerability in the local_python_executor.py Modulesmolagents
- LowHugging Face Smolagents has an Injection issuesmolagents
- LowHugging Face Smolagents has a Server-Side Request Forgery issuesmolagents
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.