{"answers":{"affected":"4 open source packages ship an affected version, including zendframework/zendframework.","exploited":"There is no known exploitation of GHSA-jq87-2wxp-8349 in the wild and no public exploit code.","fix":"Upgrade zendframework/zendframework to a fixed version for your release line: 2.0.8 or 2.1.4.","what":"GHSA-jq87-2wxp-8349 is a missing authorization vulnerability in zendframework/zendframework, published on 7 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-jq87-2wxp-8349 and fix it if it is affected.\n\nWhat it is: GHSA-jq87-2wxp-8349 is a missing authorization vulnerability in zendframework/zendframework, published on 7 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-jq87-2wxp-8349 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- zendframework/zendframework (Packagist): affected from 2.0.0; fixed in 2.0.8\n- zendframework/zendframework (Packagist): affected from 2.0.0; fixed in 2.0.8\n- zendframework/zendframework (Packagist): affected from 2.1.0; fixed in 2.1.4\n- zendframework/zendframework (Packagist): affected from 2.1.0; fixed in 2.1.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-jq87-2wxp-8349/ (Markdown: https://insights.sbomify.com/GHSA-jq87-2wxp-8349/index.md)","id":"GHSA-jq87-2wxp-8349","markdown":"https://insights.sbomify.com/GHSA-jq87-2wxp-8349/index.md","name":"GHSA-jq87-2wxp-8349","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["privilege_escalation","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP MVC framework","requires_auth":"none","summary":"Attackers can bypass routing constraints and execute unintended controllers by injecting query parameters, potentially accessing restricted functionality.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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' =\u003e array(\n        'type' =\u003e 'segment',\n        'options' =\u003e array(\n            'route' =\u003e '/user/:key',\n            'defaults' =\u003e array(\n                'controller' =\u003e 'UserController',\n                'action'     =\u003e 'show-action',\n            ),\n            'constraints' =\u003e array(\n                'key' =\u003e '[a-z0-9]+',\n            ),\n        ),\n        'child_routes' =\u003e array(\n            'query' =\u003e array('type' =\u003e 'query'),\n        ),\n    ),\n)\n```\nIf the request URI was /user/foo/?controller=SecretController\u0026key=invalid_value, the RouteMatch returned after routing would contain the following:\n```\narray(\n    'controller' =\u003e 'SecretController',\n    'action'     =\u003e 'show-action',\n    'key'        =\u003e '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.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"ZendFramework Route Parameter Injection Via Query String in `Zend\\Mvc`","id":"GHSA-jq87-2wxp-8349","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"missing_authorization","year":"2024"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["2.0.8"],"introduced":["2.0.0"],"last_affected":[],"package":"zendframework/zendframework","purl":null,"source":"GHSA-jq87-2wxp-8349"},{"ecosystem":"Packagist","fixed":["2.0.8"],"introduced":["2.0.0"],"last_affected":[],"package":"zendframework/zendframework","purl":"pkg:composer/zendframework/zendframework","source":"GHSA-jq87-2wxp-8349"},{"ecosystem":"Packagist","fixed":["2.1.4"],"introduced":["2.1.0"],"last_affected":[],"package":"zendframework/zendframework","purl":null,"source":"GHSA-jq87-2wxp-8349"},{"ecosystem":"Packagist","fixed":["2.1.4"],"introduced":["2.1.0"],"last_affected":[],"package":"zendframework/zendframework","purl":"pkg:composer/zendframework/zendframework","source":"GHSA-jq87-2wxp-8349"}],"products":null,"published":"2024-06-07","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass routing constraints and execute unintended controllers by injecting query parameters, potentially accessing restricted functionality.","url":"https://insights.sbomify.com/GHSA-jq87-2wxp-8349/"}