SecurityContext

CVE-2026-133161: Pydantic AI Harness - Denial of Service

  • Cve: CVE-2026-133161
  • Name: Pydantic AI Harness - Denial of Service
  • Description: ### Summary ui With `strip_ansi=True`, Pydantic AI Harness's `ToolOutputLimits` capability removes ANSI escape sequences from tool output with a pattern that takes time quadratic in the length of a line. A tool result of a few hundred kilobytes, crafted with many unterminated escape sequences, can occupy the event loop for tens of seconds to minutes, delaying every other request and agent run in the process. ### Details This affects applications that set `strip_ansi=True` on `ToolOutputLimits` (named `OverflowingToolOutput` before 0.13.0) and run tools whose output an attacker can influence, such as shell commands, file reads, fetched pages or MCP servers. Stripping runs on the event loop before the capability reduces the output, so its own size limits do not bound it. The assumed attacker can place text in content a tool returns. ### Mitigation Upgrade `pydantic-ai-harness` to 0.70.0 or later. Until then, leave `strip_ansi` at its default, `False`. On Pydantic AI v1, the harness cannot be upgraded past 0.4.0. Upgrade to Pydantic AI v2 and `pydantic-ai-harness` 0.70.0, or leave `strip_ansi` off.
  • Impact: Attackers can occupy the event loop for tens of seconds to minutes, delaying all other requests and agent runs in the process.
  • Remediation: Upgrade pydantic-ai-harness to 0.70.0 or later; until then leave strip_ansi at its default False. On Pydantic AI v1, upgrade to Pydantic AI v2 and pydantic-ai-harness 0.70.0.
  • Vulnerability impact: denial_of_service
  • Requirements: strip_ansi must be enabled and attacker must control tool output content
  • Labels source: securitycontext
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.00411
  • Epss percentile: 0.36152
  • Assignee: 7cec5f2f-3032-4006-8740-31f605ffab5f
  • Published at: 2026-11-19T15:17:35Z
  • Age in days: 5
  • Modified at: 2026-11-23T15:41:46Z
  • References total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-133161
  • Nvd status: awaiting_analysis
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
  • Not known: vulnerability type, requirement type, hackerone

Cwe

IdName
CWE-1333Inefficient Regular Expression Complexity

References

UrlSourceTags
https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3nvd

Projects

RepositoryLink kindsIndexedUrl
pydantic/pydantic-aisecurity_advisoryyes/v1/repositories/pydantic/pydantic-ai

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts