GHSA-jq87-2wxp-8349: Zendframework/zendframework ZendFramework Route Parameter Injection Vulnerability
HIGHGHSA-jq87-2wxp-8349 is a HIGH (CVSS 7.5) zendframework route parameter injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Zendframework/zendframework libraries in the Packagist ecosystem. The issue involves zendframework route parameter injection via query string in `zend\mvc`. Remediation is available by upgrading affected packages to version 2.0.8, 2.1.4.
GHSA-jq87-2wxp-8349 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix GHSA-jq87-2wxp-8349
To remediate this vulnerability, upgrade all affected Zendframework/zendframework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade zendframework/zendframework to 2.0.8
Upgrade zendframework/zendframework to 2.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for zendframework/zendframework
How to Check if You Are Affected
To determine whether your application is affected by GHSA-jq87-2wxp-8349, inspect your project dependencies for Zendframework/zendframework:
inspect dependencies for zendframework/zendframework
Analyze the terminal output to locate any version of Zendframework/zendframework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.8), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Zendframework/zendframework, 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
GHSA-jq87-2wxp-8349 Affected Zendframework/zendframework Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zendframework/zendframework
|
Packagist |
≥ 2.0.0
< 2.0.8
|
2.0.8
|
|
zendframework/zendframework
|
Packagist |
≥ 2.1.0
< 2.1.4
|
2.1.4
|
References
Frequently Asked Questions
What is GHSA-jq87-2wxp-8349?
Which Zendframework/zendframework versions are affected?
What version fixes GHSA-jq87-2wxp-8349?
Is zendframework/zendframework affected?
What is the CVSS score of GHSA-jq87-2wxp-8349?
What CWE is associated with GHSA-jq87-2wxp-8349?
How can I check Packagist dependencies for GHSA-jq87-2wxp-8349?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jq87-2wxp-8349",
"modified" : "2024-06-07T20:15:48Z",
"published" : "2024-06-07T20:15:48Z",
"aliases" : [ ],
"summary" : "ZendFramework Route Parameter Injection Via Query String in `Zend\\Mvc`",
"details" : "In Zend Framework 2, `Zend\\Mvc\\Router\\Http\\Query` is used primarily to allow appending query strings to URLs when assembled. However, due to the fact that it captures any query parameters into the RouteMatch, and the fact that RouteMatch parameters are merged with any parent routes, this can lead to overriding already captured routing parameters, bypassing constraints defined in the parents.\n\nAs an example, consider the following route definition:\n```\narray(\n 'user' => array(\n 'type' => 'segment',\n 'options' => array(\n 'route' => '/user/:key',\n 'defaults' => array(\n 'controller' => 'UserController',\n 'action' => 'show-action',\n ),\n 'constraints' => array(\n 'key' => '[a-z0-9]+',\n ),\n ),\n 'child_routes' => array(\n 'query' => array('type' => 'query'),\n ),\n ),\n)\n```\nIf the request URI was /user/foo/?controller=SecretController&key=invalid_value, the RouteMatch returned after routing would contain the following:\n```\narray(\n 'controller' => 'SecretController',\n 'action' => 'show-action',\n 'key' => 'invalid_value',\n)\n```\nThis would lead to execution of a different controller than intended, with a value for the key parameter that bypassed the constraints outlined in the parent route.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "zendframework/zendframework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/zendframework/zendframework/commit/0a7ec3407f02db29ea2ffd6daa71ead6fd151cfe"
}, {
"type" : "WEB",
"url" : "https://github.com/zendframework/zendframework/commit/7fcb88ebc2d56f74aa943909f2b6b53f5c86b081"
}, {
"type" : "WEB",
"url" : "https://framework.zend.com/security/advisory/ZF2013-01"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/ZF2013-01.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/zendframework/zendframework"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-07T20:15:48Z",
"nvd_published_at" : null
}
}