PYSEC-2026-1930

    Dashboard / Vulnerabilities / PYSEC-2026-1930

    PYSEC-2026-1930

    Published: 7 Jul 2026Last Modified: 7 Jul 2026

    Summary: Hugging Face Smolagents XPath injection vulnerability in the search_item_ctrl_f function

    Details: 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

    Package

    Name: smolagents

    Purl: pkg:pypi/smolagents

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -1.22.0

    Affected versions

    0.1.0
    0.1.2
    0.1.3

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    PYSEC-2026-1930 | CVE-DB