{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-133161","id":"CVE-2026-133161","title":"Pydantic AI Harness denial of service in ANSI stripping","description":"### Summary ui\n\nWith `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 ","descriptionLong":"### Summary ui\n\nWith `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.\n\n### Details\n\nThis 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.\n\nThe assumed attacker can place text in content a tool returns.\n\n### Mitigation\n\nUpgrade `pydantic-ai-harness` to 0.70.0 or later. Until then, leave `strip_ansi` at its default, `False`.\n\nOn 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.","published":"2026-11-19T14:16:31.556Z","updated":"2026-11-19T14:19:50.434Z","reserved":"2026-11-19T13:46:17.487Z","status":"PUBLISHED","rejected":false,"assigner":"Pydantic","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"Pydantic"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"Pydantic"}],"rating":"high","products":["pydantic-ai-harness"],"affectedProducts":[{"vendor":"pydantic","product":"pydantic-ai-harness","defaultStatus":"unaffected","versions":[{"lessThanOrEqual":"0.69.0","status":"affected","version":"0.4.0","versionType":"python"}],"platforms":[]}],"packages":[],"cwes":["CWE-1333"],"aliases":[],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3","tags":["vendor-advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":null,"epssPercentile":null,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-133161","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133161","ok":false,"note":"not found"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-133161","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-133161","ok":false,"note":"no score yet"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}