GHSA-g52p-86j5-xr8q ZendFramework Potential Cross-site Scripting in Development Environment Error View Script
An attacker can execute arbitrary scripts in a victim's browser via unescaped parameters in development mode error views.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-g52p-86j5-xr8q?
GHSA-g52p-86j5-xr8q is a cross-site scripting vulnerability in zendframework/zendframework1, published on 7 Jun 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The default error handling view script generated using Zend_Tool failed to escape request parameters when run in the "development" configuration environment, providing a potential XSS attack vector.
Zend_Tool_Project_Context_Zf_ViewScriptFile was patched such that the view script template now calls the escape() method on dumped request variables.
Zend Framework 1.11.4 includes a patch that adds escaping to the generated error/error.phtml view script, ensuring that request variables are escaped appropriately for the browser. Do note, however, that this will not update any previously generated code. You will still need to follow the next advice for previously generated error view scripts.
Which versions are affected by GHSA-g52p-86j5-xr8q?
2 open source packages ship an affected version, including zendframework/zendframework1.
| Package | Affected | Fixed in |
|---|---|---|
zendframework/zendframework1 Packagist | From 1.0.0 | 1.11.4 |
zendframework/zendframework1 Packagist | From 1.0.0 | 1.11.4 |
How do I fix GHSA-g52p-86j5-xr8q?
Upgrade zendframework/zendframework1 to 1.11.4 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-g52p-86j5-xr8q being exploited?
There is no known exploitation of GHSA-g52p-86j5-xr8q in the wild and no public exploit code.