{"api_version":"1","generated_at":"2026-11-19T21:10:10+00:00","cve":"CVE-2026-133161","urls":{"html":"https://cve.report/CVE-2026-133161","api":"https://cve.report/api/cve/CVE-2026-133161.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-133161","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-133161"},"summary":{"title":"Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop","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 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.","state":"PUBLISHED","assigner":"Pydantic","published_at":"2026-11-19 15:17:35","updated_at":"2026-11-19 15:17:35"},"problem_types":["CWE-1333","CWE-1333 CWE-1333: Inefficient Regular Expression Complexity"],"metrics":[{"version":"3.1","source":"7cec5f2f-3032-4006-8740-31f605ffab5f","type":"Secondary","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3","name":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3","refsource":"7cec5f2f-3032-4006-8740-31f605ffab5f","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-133161","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133161","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"pydantic","product":"pydantic-ai-harness","version":"affected 0.4.0 0.69.0 python","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"manus-pi","lang":"en"},{"source":"CNA","value":"manus-use","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-133161","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-11-19T14:45:16.499081Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-11-19T14:45:37.861Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"collectionURL":"https://pypi.org","defaultStatus":"unaffected","packageName":"pydantic-ai-harness","product":"pydantic-ai-harness","repo":"https://github.com/pydantic/pydantic-ai","vendor":"pydantic","versions":[{"lessThanOrEqual":"0.69.0","status":"affected","version":"0.4.0","versionType":"python"}]}],"credits":[{"lang":"en","type":"reporter","value":"manus-pi"},{"lang":"en","type":"reporter","value":"manus-use"}],"descriptions":[{"lang":"en","value":"### 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."}],"metrics":[{"cvssV3_1":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1333","description":"CWE-1333: Inefficient Regular Expression Complexity","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-19T14:19:50.434Z","orgId":"7cec5f2f-3032-4006-8740-31f605ffab5f","shortName":"Pydantic"},"references":[{"tags":["vendor-advisory"],"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3"}],"source":{"advisory":"GHSA-m4cr-m4qc-9hh3","discovery":"UNKNOWN"},"title":"Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop"}},"cveMetadata":{"assignerOrgId":"7cec5f2f-3032-4006-8740-31f605ffab5f","assignerShortName":"Pydantic","cveId":"CVE-2026-133161","datePublished":"2026-11-19T14:16:31.556Z","dateReserved":"2026-11-19T13:46:17.487Z","dateUpdated":"2026-11-19T14:45:37.861Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-19 15:17:35","lastModifiedDate":"2026-11-19 15:17:35","problem_types":["CWE-1333","CWE-1333 CWE-1333: Inefficient Regular Expression Complexity"],"metrics":{"cvssMetricV31":[{"source":"7cec5f2f-3032-4006-8740-31f605ffab5f","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-11-19T14:45:16.499081Z","id":"CVE-2026-133161","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"133161","Ordinal":"1","Title":"Harness `ToolOutputLimits` ANSI stripping can take quadratic tim","CVE":"CVE-2026-133161","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"133161","Ordinal":"1","NoteData":"### 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.","Type":"Description","Title":"Harness `ToolOutputLimits` ANSI stripping can take quadratic tim"}]}}}