Improper Neutralization of Data within XPath Expressions ('XPath Injection') Affecting smolagents package, versions [,1.22.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Neutralization of Data within XPath Expressions ('XPath Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-SMOLAGENTS-13537512
  • published13 Oct 2025
  • disclosed2 Oct 2025
  • creditUnknown

Introduced: 2 Oct 2025

NewCVE-2025-11844  (opens in a new tab)
CWE-643  (opens in a new tab)

How to fix?

Upgrade smolagents to version 1.22.0 or higher.

Overview

smolagents is a 🤗 smolagents: a barebones library for agents. Agents write python code to call tools or orchestrate other agents.

Affected versions of this package are vulnerable to Improper Neutralization of Data within XPath Expressions ('XPath Injection') via the search_item_ctrl_f() function due to the lack of user-supplied text escaping. An attacker could find out how the XML data is structured, or access data that they may not have access to.

References

CVSS Base Scores

version 4.0
version 3.1