Vulnerability · Published Oct 22, 2025 · Assigned by @huntr_ai

CVE-2025-11844XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function

Medium 5.4

In plain English

A medium-severity security flaw in huggingface/smolagents from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)5.4Medium
Exploit odds (30 days)0.3%top 79.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIsmolagents1.22.0GHSA-8mf9-rmgw-33qc
PyPIsmolagents1.22.0PYSEC-2026-1930

Affected products (as reported)

VendorProductVersions
huggingface huggingface/smolagents unspecified – before 1.22.0

Weakness: CWE-643 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

References