CVE-2016-10034: Zendframework/zend mail Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-r9mw-gwx9-v3h5
CVSS 9.8
CWE-77
Published
Advisory Summary

CVE-2016-10034 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Zendframework/zend mail libraries in the Packagist ecosystem. The issue involves zend-mail remote code execution via sendmail adapter. Remediation is available by upgrading affected packages to version 2.4.11, 2.7.2.

CVE-2016-10034 at a Glance

CVE Identifier CVE-2016-10034
GHSA Identifier GHSA-r9mw-gwx9-v3h5
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Zendframework/zend mail
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2016-10034

To remediate this vulnerability, upgrade all affected Zendframework/zend mail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zendframework/zend-mail fixed: 2.4.11
Upgrade zendframework/zend-mail to 2.4.11
zendframework/zend-mail fixed: Latest secure release
Upgrade zendframework/zend-mail to Latest secure release
zendframework/zend-mail fixed: Latest secure release
Upgrade zendframework/zend-mail to Latest secure release
zendframework/zend-mail fixed: 2.7.2
Upgrade zendframework/zend-mail to 2.7.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for zendframework/zend-mail

How to Check if You Are Affected

To determine whether your application is affected by CVE-2016-10034, inspect your project dependencies for Zendframework/zend mail:

inspect dependencies for zendframework/zend-mail

Analyze the terminal output to locate any version of Zendframework/zend mail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.11), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Zendframework/zend mail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The setFrom function in the Sendmail adapter in the zend-mail component before 2.4.11, 2.5.x, 2.6.x, and 2.7.x before 2.7.2, and Zend Framework before 2.4.11 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted e-mail address.

CVE-2016-10034 Affected Zendframework/zend mail Versions

4 component(s)
Fixed Versions:
2.4.112.7.2
Product / Package Ecosystem Affected Versions Fixed Version
zendframework/zend-mail
Packagist
< 2.4.11
2.4.11
zendframework/zend-mail
Packagist
≥ 2.5
≤ 2.5.2
zendframework/zend-mail
Packagist
≥ 2.6
≤ 2.6.2
zendframework/zend-mail
Packagist
≥ 2.7
< 2.7.2
2.7.2

References

Frequently Asked Questions

What is CVE-2016-10034?
CVE-2016-10034 is a security vulnerability in Zendframework/zend mail involving zend-mail remote code execution via Sendmail adapter under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Zendframework/zend mail versions are affected?
Affected versions include releases prior to 2.4.11, 2.7.2 across affected packages: zendframework/zend-mail.
What version fixes CVE-2016-10034?
Upgrading to 2.4.11, 2.7.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zendframework/zend-mail affected?
Yes, zendframework/zend-mail is affected in releases prior to 2.4.11, Latest secure release, 2.7.2. Upgrade your dependency to 2.4.11, Latest secure release, 2.7.2 or later.
What is the CVSS score of CVE-2016-10034?
CVE-2016-10034 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-10034?
CVE-2016-10034 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2016-10034?
Run the dependency tree command: 'inspect dependencies for zendframework/zend-mail'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r9mw-gwx9-v3h5",
  "modified" : "2024-04-23T23:13:14Z",
  "published" : "2022-05-14T02:19:49Z",
  "aliases" : [ "CVE-2016-10034" ],
  "summary" : "zend-mail remote code execution via Sendmail adapter",
  "details" : "The setFrom function in the Sendmail adapter in the zend-mail component before 2.4.11, 2.5.x, 2.6.x, and 2.7.x before 2.7.2, and Zend Framework before 2.4.11 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \\\" (backslash double quote) in a crafted e-mail address.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendframework/zend-mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendframework/zend-mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5"
      }, {
        "last_affected" : "2.5.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendframework/zend-mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6"
      }, {
        "last_affected" : "2.6.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendframework/zend-mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7"
      }, {
        "fixed" : "2.7.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10034"
  }, {
    "type" : "WEB",
    "url" : "https://framework.zend.com/security/advisory/ZF2016-04"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zendframework/zend-mail"
  }, {
    "type" : "WEB",
    "url" : "https://legalhackers.com/advisories/ZendFramework-Exploit-ZendMail-Remote-Code-Exec-CVE-2016-10034-Vuln.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201804-10"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/40979"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/40986"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/42221"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/95144"
  }, {
    "type" : "WEB",
    "url" : "http://www.securitytracker.com/id/1037539"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-23T23:13:13Z",
    "nvd_published_at" : "2016-12-30T19:59:00Z"
  }
}