CVE-2026-57130

HIGHPre-NVD 8.18.1
EchelonGraph scoreLOW confidence

This high-severity CVE scores 8.1 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
8.1EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 8.1Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

PraisonAI: IMAP Command Injection via Unsanitized Email Search Parameters

Summary

The email search tool in src/praisonai-agents/praisonaiagents/tools/email_tools.py constructs IMAP SEARCH commands by interpolating LLM-controlled parameters (from_addr, subject, query) directly into IMAP protocol strings using f-string formatting with double-quote delimiters. An attacker who can influence the arguments to the search_emails or reply_email tool (via crafted agent prompts) can inject arbitrary IMAP commands, potentially exfiltrating email data from other folders, deleting emails, or performing other unauthorized IMAP operations.

Details

Vulnerable code (lines 493–502):

criteria = []
if from_addr:
    criteria.append(f'FROM "{from_addr}"')
if subject:
    criteria.append(f'SUBJECT "{subject}"')
if query:
    criteria.append(f'TEXT "{query}"')
if not criteria:
    criteria.append("ALL")
search_str = " ".join(criteria)
status, data = mail.search(None, search_str)

The from_addr, subject, and query parameters originate from LLM tool call arguments (the search_emails public function at line 665). These values flow through without any sanitization or escaping. The double-quote (") characters in these parameters allow breaking out of the IMAP SEARCH quoted string context.

Additional injection points:

  • Line 416: mail.search(None, f'HEADER Message-ID "{search_id}"')
  • Line 447: Same pattern in _smtp_reply_email
  • Line 542: Same pattern in _smtp_archive_email

The search_id / message_id parameter in these functions is also LLM-controlled via the reply_email and archive_email public tool functions.

Reachability: The search_emails, reply_email, and archive_email functions are exposed as agent tools. They are reachable when an agent is configured with email tools (EMAIL_ADDRESS + EMAIL_PASSWORD environment variables set). This is a documented deployment scenario for email-capable agents.

PoC

Setup: Requires an IMAP server (not run here — this is a static proof). The vulnerability is demonstrated by tracing the data flow.

Positive trigger — IMAP injection via search_emails: An LLM agent processing a crafted prompt calls:

search_emails(from_addr='[email protected]" LOGOUT')
This produces the IMAP command:
SEARCH FROM "[email protected]" LOGOUT"
The LOGOUT command is injected after the prematurely closed quoted string, causing the IMAP connection to be terminated.

More severe injection — exfiltrate emails from another folder:

search_emails(query='" SEARCH RETURN (MIN) ALL')
Produces: TEXT "" SEARCH RETURN (MIN) ALL" — injects a secondary SEARCH command.

Negative control — legitimate search:

search_emails(from_addr='[email protected]')
Produces: FROM "[email protected]" — correct, no injection.

Cleanup: No persistent changes for read-only injection. For destructive injection (DELETE, EXPUNGE), impact persists.

Impact

An attacker who can craft prompts that cause an LLM agent to call search_emails with injection payloads can:

  • Terminate IMAP connections (denial of service)
  • Inject arbitrary IMAP commands — including LIST (enumerate folders), SELECT (switch folders), FETCH (read emails from other mailboxes), STORE (modify flags), COPY/MOVE (move emails), DELETE/EXPUNGE (permanently delete emails)
  • Exfiltrate email contents from folders the user did not intend to expose to the agent
  • Permanently delete emails via injected DELETE + EXPUNGE commands

The attack requires the IMAP backend to be configured (EMAIL_ADDRESS + EMAIL_PASSWORD env vars), which is a documented and common deployment for email-capable agents.

Suggested remediation

  • Escape double-quote characters in IMAP parameters. Per RFC 3501, literal strings use {n}\r\n format or quoted strings with \ escaping:
def _escape_imap_string(s: str) -> str:
    """Escape a string for safe use in IMAP quoted strings."""
    # Use IMAP literal syntax for safety: {length}\r\n
    encoded = s.encode('utf-8')
    return f'{{{len(encoded)}}}\r\n{encoded}'
  • Use IMAP literal syntax ({n}\r\ndata) instead of quoted strings for all user-controlled parameters. This prevents any injection regardless of content.
  • Apply the escaping to all IMAP search criteria parameters: from_addr, subject, query, and search_id/message_id.

CVSS v3
8.1
EG Score
8.1(low)
EG Risk
41(Track)
EG Risk 41/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity81% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

June 18, 2026

Last Modified

June 18, 2026

Vendor Advisories for CVE-2026-57130(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
praisonaiagents0.0.1 ... 1.6.9 (586 versions)1.6.59

Data Freshness Timeline

(refreshed 3× in last 7d / 3× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-26 17:46 UTCEG score recompute
  2. 2026-07-23 03:20 UTCEG score recompute
  3. 2026-07-20 21:33 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-57130?
CVE-2026-57130 is a high vulnerability published on June 18, 2026. PraisonAI: IMAP Command Injection via Unsanitized Email Search Parameters Summary The email search tool in src/praisonai-agents/praisonaiagents/tools/emailtools.py constructs IMAP SEARCH commands by interpolating LLM-controlled parameters (fromaddr, subject, query) directly into IMAP protocol…
When was CVE-2026-57130 disclosed?
CVE-2026-57130 was first published in the National Vulnerability Database on June 18, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-57130?
CVE-2026-57130 has a CVSS v4.0 base score of 8.1 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-57130?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-57130, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-57130

Explore →

Is Your Infrastructure Affected by CVE-2026-57130?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.