---
id: CVE-2025-11844
aliases:
  - GHSA-8mf9-rmgw-33qc
  - PYSEC-2026-1930
title: >-
  Hugging Face Smolagents XPath injection vulnerability in the
  search_item_ctrl_f function
summary: >-
  Hugging Face Smolagents XPath injection vulnerability in the
  search_item_ctrl_f function
severity: medium
cvss: 5.4
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'
vendor: smolagents
product: smolagents
ecosystem: pip
affected:
  - smolagents < 1.22.0
patched:
  - smolagents 1.22.0
published: '2025-10-22'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-8mf9-rmgw-33qc'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-11844'
  - url: >-
      https://github.com/huggingface/smolagents/commit/f570ed5e17999d4cf7d5e79c2830fbaefab8a794
  - url: 'https://github.com/huggingface/smolagents'
  - url: 'https://huntr.com/bounties/01ab4405-9bca-4b26-b7a3-5ca1863a69b4'
tags:
  - osv
  - pip
  - exploit-available
epss: 0.00283
epssPercentile: 0.18452
ingestedAt: '2026-07-08T18:25:47.518Z'
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/SparshBiswas-AI/CVE-2025-11844-smolagents'
  checkedAt: '2026-09-25T08:20:44.549Z'
exploitAvailable: true
---

## Overview

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

- `smolagents < 1.22.0`

## Remediation

Upgrade to a patched release:

- `smolagents 1.22.0`
