GHSA-CXF7-M5G2-V594

GHSA-CXF7-M5G2-V594 is a high-severity security vulnerability in zendframework/zend-mail (composer), affecting versions >= 2.0.0, < 2.4.11. It is fixed in 2.4.11, 2.7.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Zend-Mail remote code execution in zend-mail via Sendmail adapter

When using the zend-mail component to send email via the Zend\Mail\Transport\Sendmail transport, a malicious user may be able to inject arbitrary parameters to the system sendmail program. The attack is performed by providing additional quote characters within an address; when unsanitized, they can be interpreted as additional command line arguments, leading to the vulnerability.

The following example demonstrates injecting additional parameters to the sendmail binary via the From address:

use Zend\Mail;

$mail = new Mail\Message();
$mail->setBody('This is the text of the email.');

// inject additional parameters to sendmail command line
$mail->setFrom('"AAA\" params injection"@domain', 'Sender\'s name');

$mail->addTo('hacker@localhost', 'Name of recipient');
$mail->setSubject('TestSubject');

$transport = new Mail\Transport\Sendmail();
$transport->send($mail);

The attack works because zend-mail filters the email addresses using the RFC 3696 specification, where the string "AAA" params injection"@domain is considered a valid address. This validation is provided using the zend-validator component with the following parameters:

Zend\Validator\EmailAddress(
    Zend\Validator\Hostname::ALLOW_DNS | Zend\Validator\Hostname::ALLOW_LOCAL
)

The above accepts local domain with any string specified by double quotes as the local part. While this is valid per RFC 3696, due to the fact that sender email addresses are provided to the sendmail binary via the command line, they create the vulnerability described above.

Impact

GHSA-CXF7-M5G2-V594 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.4.11, 2.7.2); upgrading removes the vulnerable code path.

Affected versions

zendframework/zend-mail (>= 2.0.0, < 2.4.11) zendframework/zend-mail (>= 2.5.0, < 2.7.2)

Security releases

zendframework/zend-mail → 2.4.11 (composer) zendframework/zend-mail → 2.7.2 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

zendframework/zend-mail to 2.4.11 or later; zendframework/zend-mail to 2.7.2 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-CXF7-M5G2-V594? GHSA-CXF7-M5G2-V594 is a high-severity security vulnerability in zendframework/zend-mail (composer), affecting versions >= 2.0.0, < 2.4.11. It is fixed in 2.4.11, 2.7.2.
  2. How severe is GHSA-CXF7-M5G2-V594? GHSA-CXF7-M5G2-V594 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of zendframework/zend-mail are affected by GHSA-CXF7-M5G2-V594? zendframework/zend-mail (composer) versions >= 2.0.0, < 2.4.11 is affected.
  4. Is there a fix for GHSA-CXF7-M5G2-V594? Yes. GHSA-CXF7-M5G2-V594 is fixed in 2.4.11, 2.7.2. Upgrade to this version or later.
  5. Is GHSA-CXF7-M5G2-V594 exploitable, and should I be worried? Whether GHSA-CXF7-M5G2-V594 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-CXF7-M5G2-V594 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-CXF7-M5G2-V594?
    • Upgrade zendframework/zend-mail to 2.4.11 or later
    • Upgrade zendframework/zend-mail to 2.7.2 or later

Other vulnerabilities in zendframework/zend-mail

Stop the waste.
Protect your environment with Kodem.