Skip to content
Heist/ feed
Back to feed
Medium

XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-11844
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 00:57 UTC · Revision 1

Source evidence

XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function

core-osv · Original source

Published 22 Oct 2025, 13:13 UTC

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.

osv:CVE-2025-11844
Complete source record
{
  "id": "f70fc880539678a5dcc9bc94ac5d5baa61afd57bc3ca1e644bd1ff2a294dfb2b",
  "url": "https://osv.dev/vulnerability/CVE-2025-11844",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "XPath Injection in Hugging Face Smolagents search_item_ctrl_f Function",
    "summary": "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.",
    "evidence": "osv:CVE-2025-11844",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-11844",
      "aliases": [
        "CVE-2025-11844",
        "GHSA-8mf9-rmgw-33qc",
        "PYSEC-2026-1930"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/huggingface/smolagents",
              "type": "GIT",
              "events": [
                {
                  "introduced": "808e0958701b3a5b39efe7e48355bb13c19cc9dd"
                },
                {
                  "fixed": "f68ee35967da5c9051a0a9d94af6ac9ca06dafc2"
                },
                {
                  "fixed": "f570ed5e17999d4cf7d5e79c2830fbaefab8a794"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:huggingface:smolagents:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.20.0"
                      },
                      {
                        "fixed": "1.22.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f570ed5e17999d4cf7d5e79c2830fbaefab8a794"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-11844.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.692951106Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/11xxx/CVE-2025-11844.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-11844",
        "https://github.com/huggingface/smolagents/commit/f570ed5e17999d4cf7d5e79c2830fbaefab8a794"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-643"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/11xxx/CVE-2025-11844.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-11844",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521144,
  "published_at": "2025-10-22T13:13:55.882+00:00"
}