Vulnerability DatabaseCVE-2026-143791

CVE-2026-143791: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-143791 is a ReDoS (Regular Expression Denial of Service) vulnerability in Pydantic AI Harness's secret redaction functionality. The private_key pattern used in secret redaction can backtrack exponentially on crafted short input, causing the event loop to stall for minutes or longer. It affects pydantic-ai-harness versions 0.16.0 through 0.65.0, with version 0.66.0 released as the fix. Note: This CVE has been officially rejected/withdrawn by its CNA, as it was reserved for an advisory that was closed without publication. The associated CVSS v3.1 base score was 7.5 (High) (GitHub Advisory).

Technical details

The root cause is classified as CWE-1333 (Inefficient Regular Expression Complexity), also mapped to CAPEC-492 (Regular Expression Exponential Blowup). The vulnerable private_key pattern in the redact_secrets / secret_data() guardrail detectors exhibits catastrophic backtracking when evaluated against crafted input that begins like a private key but does not fully match. Because synchronous guards run on the event loop, a few hundred attacker-controlled characters are sufficient to occupy the event loop for minutes or longer. Exploitation requires only that the attacker can influence text processed by InputGuardrail, ToolGuardrail, or OutputGuardrail — such as user prompts or tool return values (GitHub Advisory).

Impact

Successful exploitation causes a denial-of-service condition by stalling the Python event loop, delaying every other concurrent request and agent run in the affected process. There is no confidentiality or integrity impact; the vulnerability is limited to availability. Applications exposing an AI agent endpoint to untrusted users are most at risk, as a single malicious prompt can render the service unresponsive for an extended period (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported. The attack requires no privileges, no user interaction, and is reachable over the network, making it trivially exploitable by any user who can send input to an affected agent. The CVE has been officially rejected/withdrawn, and no EPSS score or CISA KEV listing is associated with it (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a network-accessible application using pydantic-ai-harness versions 0.16.0–0.65.0 with redact_secrets or secret_data() guardrails enabled (default configuration includes the private_key pattern).
  2. Craft malicious input: Construct a string of a few hundred characters that begins with content resembling a private key header (e.g., -----BEGIN RSA PRIVATE KEY-----) followed by characters that cause the regex engine to backtrack exponentially without completing a match.
  3. Submit payload: Send the crafted string as a user prompt to an InputGuardrail-protected agent endpoint, as tool return content processed by ToolGuardrail, or as model output evaluated by OutputGuardrail.
  4. Trigger event loop stall: The private_key regex pattern evaluates the input synchronously on the event loop, causing exponential backtracking that occupies the loop for minutes or longer, denying service to all other concurrent requests and agent runs (GitHub Advisory).

Indicators of compromise

  • Logs: Application logs showing requests that never complete or time out after unusually long processing times; Python async event loop lag warnings or timeouts.
  • Process: Python process CPU usage spiking to 100% on a single core for extended periods (minutes) without completing a task; all concurrent agent requests stalling simultaneously.
  • Network: Repeated requests to agent endpoints containing strings resembling private key headers (e.g., -----BEGIN RSA PRIVATE KEY-----) followed by unusual character sequences.

Mitigation and workarounds

Upgrade pydantic-ai-harness to version 0.66.0 or later, which contains a patched private_key regex pattern. As an immediate workaround prior to upgrading, explicitly exclude the private_key pattern by using secret_data(only=[...]) and naming only the specific patterns required, omitting private_key. Input validation or length limits on user-supplied text processed by guardrails can also reduce exposure (GitHub Advisory).

Additional resources


Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-143791HIGH7.5
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026
CVE-2026-143790LOW3.7
  • Python logoPython
  • pydantic-ai
NoYesDec 04, 2026
CVE-2026-136643NONEN/A
  • Python logoPython
  • pydantic-evals
NoYesDec 04, 2026
CVE-2026-136640NONEN/A
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026
CVE-2026-136639NONEN/A
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management