Skip to main content

Haraka CVE-2026-140423

| EUVDEUVD-2026-140348 MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-12-01 VulnCheck GHSA-9mww-fwhf-993x
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Connect to Haraka SMTP port
  2. Delivery
    Send AUTH PLAIN with injected resinfo clauses
  3. Exploit
    Receive 535, clauses persist in connection scope
  4. Execution
    Send spoofed message in same TCP session
  5. Persist
    Haraka stamps forged dkim=pass/spf=pass/dmarc=pass in Authentication-Results
  6. Impact
    Downstream mail security component trusts spoofed results

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Exploitation requires Haraka to have at least one of the following auth plugins loaded: auth/flat_file, auth/auth_vpopmaild, auth/auth_proxy, or auth/auth_bridge - these all inherit check_user() from auth_base.js. The configured auth methods must include PLAIN or LOGIN (the CRAM-MD5 path does not pass through the vulnerable safe_user interpolation in the same way). No credentials are required - the vulnerability is triggered intentionally by a failed authentication attempt, which Haraka still processes to build the Authentication-Results entry. If STARTTLS is enforced before AUTH, the attacker must complete a TLS handshake, which requires no elevated capability. The injected clauses persist across reset_transaction in connection scope, so the attacker must send at least one MAIL FROM/RCPT TO/DATA sequence in the same TCP session after the 535 response. Practical impact is limited to Haraka instances acting as mail relays or inbound gateways where downstream components (Rspamd, Dovecot, webmail anti-phishing logic) consume Authentication-Results headers under this server's authserv-id; the GHSA reporter notes that specific downstream consumer behavior with Dovecot or Rspamd was not independently tested.

Impact

The CVSS 4.0 score is 6.9 (Medium) with a fully network-accessible, zero-complexity, unauthenticated attack path (AV:N/AC:L/AT:N/PR:N/UI:N). The input vector marks only VI:L (vulnerable-system integrity) with no subsequent-system impact (SC:N/SI:N/SA:N), but this appears to underrepresent the downstream trust-chain effect: the forged clauses land inside the Authentication-Results header carrying Haraka's own authserv-id, bypassing the headers.clean_auth_results protection that renames client-supplied headers - meaning downstream mail security components (Rspamd, Dovecot, webmail anti-phishing) may treat the injected dkim=pass/spf=pass/dmarc=pass as verified results. No CISA KEV listing is present, so active exploitation is not confirmed. A working proof-of-concept with verified SMTP session output is publicly included in the GHSA advisory (GHSA-m346-w4v7-3x26), demonstrating successful clause injection against Haraka 3.4.0 on npm; this represents publicly available working exploit code. The decision label of this_month (not act_now) is consistent with the absence of observed active exploitation and the niche deployment footprint of Haraka. Practical risk is highest for mail relay operators where downstream components consume Authentication-Results to make phishing or DMARC enforcement decisions - in those environments the spoofing impact is disproportionately larger than the medium CVSS score suggests.

Exploit ScenarioDerived

An unauthenticated SMTP client connects to a Haraka server with PLAIN or LOGIN auth enabled, and submits AUTH PLAIN with a username containing '; dkim=pass header.d=bank.example; spf=pass smtp.mailfrom=bank.example; dmarc=pass header.from=bank.example'. The server responds 535 (failed) but stores the injected resinfo clauses in connection scope; in the same TCP session the attacker sends a spoofed message, and Haraka stamps an Authentication-Results header under its own authserv-id containing the forged DKIM/SPF/DMARC pass clauses alongside the legitimate auth=fail entry. A working proof-of-concept with captured SMTP output is publicly included in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Forged DKIM, SPF and DMARC 'pass' clauses can be written into Haraka's own Authentication-Results header in versions before 3.4.2, letting an unauthenticated SMTP client make a later message in the same session appear as if this server had validated the sender's authentication. Any Haraka deployment that loads one of the shipped auth plugins (auth/flat_file, auth/auth_vpopmaild, auth/auth_proxy, auth/auth_bridge) with PLAIN or LOGIN enabled is exposed: the failed-AUTH username is only stripped of control characters, so ';', '=' and spaces inside it split off as new RFC 8601 resinfo clauses under the server's own authserv-id, and the fragment persists through reset_transaction into every subsequent message in that connection. The vendor shipped a fix in 3.4.2 that emits the username as a quoted-string; the vulnerability is not listed in CISA KEV and active exploitation has not been confirmed, though the GHSA includes PoC code with demonstrated attack and control output against haraka 3.4.0, and the CVSS 4.0 score is 6.9 (Medium).

RemediationAI

Upgrade to Haraka 3.4.2 (released 2026-11-23), which contains 'fix(auth): quote failed username in Auth-Results' plus a STARTTLS-before-AUTH fix in auth_proxy and dependency bumps; the change is in commit https://github.com/haraka/Haraka/commit/c142f7d5dd4ef26568ff65bda24b529ece0504c0 and wraps the sanitized username in an RFC 8601 quoted-string, escaping '"' and '\\' so ';' and spaces cannot start new clauses. If immediate upgrade is not possible, the same quoting change can be applied to plugins/auth/auth_base.js at the line 142 auth_results() call as a stopgap (the advisory publishes the diff; verified in the reporter's patched run where the PoC yields smtp.auth="x; dkim=pass ..." inside quotes and the benign control still works), and exposure can be narrowed by removing PLAIN and LOGIN from the configured auth methods on any host running the affected auth plugins, keeping in mind that CRAM-MD5 does not travel the vulnerable interpolation path but does restrict which clients can authenticate. Operators of relay or inbound-gateway instances should also treat the server's authserv-id as untrusted downstream of an unpatched Haraka until 3.4.2 is deployed, since the forged dkim=pass/spf=pass/dmarc=pass clauses land in the one header consumers such as Rspamd, Dovecot or webmail anti-phishing logic are designed to believe.

Affected VersionsENISA

Haraka 0 <3.4.2

Affected Packages

euvd haraka fix: 3.4.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Haraka is a Node.js SMTP server whose plugins/auth/auth_base.js check_user() builds the server's own Authentication-Results header text after a FAILED SMTP AUTH attempt, calling connection.auth_results(auth=fail (${method}) smtp.auth=${safe_user}). The only filtering applied to the attacker-supplied username is a strip of control characters in auth_base.js plus utils.sanitize inside connection.auth_results(), and both remove only CR/LF - this is why the earlier CHANGELOG fix for CR/LF header splitting does not stop the issue. Because ';', '=', spaces and parentheses are exactly the delimiters of RFC 8601 resinfo clauses, a username like 'x; dkim=pass header.d=bank.example; spf=pass ...; dmarc=pass ...' is emitted verbatim into the header Haraka stamps under its own authserv-id. The fragment is stored in connection scope, so it survives the reset_transaction that follows the 535 rejection and is attached to every later message in the same TCP session. CWE-74 (injection) captures the root cause: unescaped user data crossing into a structured header syntax. Haraka's default headers.clean_auth_results already renames client-supplied Authentication-Results headers to Original-Authentication-Results, so this flaw routes the forged clauses into the one header downstream filters are meant to trust. Exploitation paths named in the advisory are auth/flat_file, auth/auth_vpopmaild, auth/auth_proxy and auth/auth_bridge, all of which inherit check_user(); the configured methods must include PLAIN or LOGIN, and the CRAM-MD5 path does not pass through the vulnerable interpolation in the same way. Whether specific downstream consumers (Dovecot, Rspamd, webmail anti-phishing logic) actually act on the forged clauses was not independently tested by the reporter.

Know when Haraka gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.8 MEDIUM

No prior auth needed (PR:N); scope changes (S:C) because forged clauses cross into downstream mail security components' trust decisions beyond Haraka's own boundary; integrity-only impact (I:L), no confidentiality or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Haraka before 3.4.2 contains a header injection vulnerability in plugins/auth/auth_base.js check_user() that writes failed SMTP AUTH usernames into Authentication-Results. Unauthenticated SMTP clients can inject clauses like dkim=pass, spf=pass and dmarc=pass under the server's authserv-id, spoofing authentication results for every later message in the session.

Threat Intelligence Overview

Prevalence
Low
Node.js SMTP server, niche footprint compared to Postfix/Exim
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy