CVE-2025-11844: CWE-643 Improper Neutralization of Data within XPath Expressions in huggingface huggingface/smolagents
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.
AI Analysis
Technical Summary
The vulnerability identified as CVE-2025-11844 affects Hugging Face's Smolagents, an AI-driven web automation tool, specifically version 1.20.0. The flaw exists in the search_item_ctrl_f function within the src/smolagents/vision_web_browser.py file, where user input is directly concatenated into an XPath expression without proper sanitization or escaping. This improper neutralization of data (CWE-643) enables an attacker to inject malicious XPath syntax, altering the intended query logic. Such injection can bypass intended search filters, granting access to DOM elements that should be restricted, and potentially disrupt the automated workflows that rely on these queries. The impact includes limited information disclosure, manipulation of AI agent interactions, and compromised reliability of automated web tasks. The vulnerability is remotely exploitable over the network without requiring authentication but does require user interaction, such as triggering the vulnerable search function. The CVSS 3.0 base score is 5.4, indicating medium severity, reflecting the limited confidentiality and integrity impact and no availability impact. No known exploits are reported in the wild as of the publication date. The issue is fixed in Smolagents version 1.22.0, where proper input sanitization and escaping have been implemented to prevent XPath injection.
Potential Impact
For European organizations leveraging Hugging Face's Smolagents for AI-driven web automation, this vulnerability poses risks primarily to the confidentiality and integrity of automated processes. Attackers exploiting the XPath injection can bypass search filters, potentially exposing sensitive DOM elements or data not intended for access. This could lead to partial information disclosure, manipulation of AI agent behavior, and disruption of automated workflows critical for business operations. While the vulnerability does not directly impact system availability, compromised automation reliability can cause operational inefficiencies or erroneous decision-making. Organizations in sectors relying heavily on AI automation for data processing, such as finance, healthcare, or research, may experience amplified impacts. Given the medium severity and requirement for user interaction, the threat level is moderate but warrants timely remediation to prevent exploitation, especially in environments where Smolagents are integrated into critical workflows.
Mitigation Recommendations
European organizations should upgrade Hugging Face Smolagents to version 1.22.0 or later, where the XPath injection vulnerability is patched. Until upgrading is feasible, implement input validation and sanitization at the application layer to ensure user-supplied data does not contain malicious XPath syntax. Employ web application firewalls (WAFs) capable of detecting and blocking XPath injection patterns. Restrict access to the vulnerable search functionality to trusted users or networks to reduce exposure. Conduct thorough code reviews and security testing on any custom extensions or integrations involving XPath queries. Monitor logs for unusual query patterns or errors indicative of injection attempts. Educate users about the risks of interacting with untrusted inputs in automated workflows. Finally, maintain an inventory of systems using Smolagents to ensure all instances are identified and patched promptly.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
CVE-2025-11844: CWE-643 Improper Neutralization of Data within XPath Expressions in huggingface huggingface/smolagents
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.
AI-Powered Analysis
Technical Analysis
The vulnerability identified as CVE-2025-11844 affects Hugging Face's Smolagents, an AI-driven web automation tool, specifically version 1.20.0. The flaw exists in the search_item_ctrl_f function within the src/smolagents/vision_web_browser.py file, where user input is directly concatenated into an XPath expression without proper sanitization or escaping. This improper neutralization of data (CWE-643) enables an attacker to inject malicious XPath syntax, altering the intended query logic. Such injection can bypass intended search filters, granting access to DOM elements that should be restricted, and potentially disrupt the automated workflows that rely on these queries. The impact includes limited information disclosure, manipulation of AI agent interactions, and compromised reliability of automated web tasks. The vulnerability is remotely exploitable over the network without requiring authentication but does require user interaction, such as triggering the vulnerable search function. The CVSS 3.0 base score is 5.4, indicating medium severity, reflecting the limited confidentiality and integrity impact and no availability impact. No known exploits are reported in the wild as of the publication date. The issue is fixed in Smolagents version 1.22.0, where proper input sanitization and escaping have been implemented to prevent XPath injection.
Potential Impact
For European organizations leveraging Hugging Face's Smolagents for AI-driven web automation, this vulnerability poses risks primarily to the confidentiality and integrity of automated processes. Attackers exploiting the XPath injection can bypass search filters, potentially exposing sensitive DOM elements or data not intended for access. This could lead to partial information disclosure, manipulation of AI agent behavior, and disruption of automated workflows critical for business operations. While the vulnerability does not directly impact system availability, compromised automation reliability can cause operational inefficiencies or erroneous decision-making. Organizations in sectors relying heavily on AI automation for data processing, such as finance, healthcare, or research, may experience amplified impacts. Given the medium severity and requirement for user interaction, the threat level is moderate but warrants timely remediation to prevent exploitation, especially in environments where Smolagents are integrated into critical workflows.
Mitigation Recommendations
European organizations should upgrade Hugging Face Smolagents to version 1.22.0 or later, where the XPath injection vulnerability is patched. Until upgrading is feasible, implement input validation and sanitization at the application layer to ensure user-supplied data does not contain malicious XPath syntax. Employ web application firewalls (WAFs) capable of detecting and blocking XPath injection patterns. Restrict access to the vulnerable search functionality to trusted users or networks to reduce exposure. Conduct thorough code reviews and security testing on any custom extensions or integrations involving XPath queries. Monitor logs for unusual query patterns or errors indicative of injection attempts. Educate users about the risks of interacting with untrusted inputs in automated workflows. Finally, maintain an inventory of systems using Smolagents to ensure all instances are identified and patched promptly.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2025-10-16T09:30:14.323Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 68f8dca32e6b0a7b0dc9bfb1
Added to database: 10/22/2025, 1:31:15 PM
Last enriched: 10/22/2025, 1:46:11 PM
Last updated: 10/24/2025, 1:18:25 AM
Views: 19
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
The Best End User Security Awareness Programs Aren't About Awareness Anymore
MediumSecure AI at Scale and Speed — Learn the Framework in this Free Webinar
MediumNorth Korean Hackers Lure Defense Engineers With Fake Jobs to Steal Drone Secrets
MediumCVE-2024-7885: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
HighCVE-2025-7730: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in boldthemes Bold Page Builder
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.