GHSA-6v7p-5qcq-268c Zend-Navigation vulnerable to Cross-site Scripting
An attacker can inject malicious scripts via HTML attributes in Zend Framework view helpers, potentially stealing user data or executing code.
- 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-6v7p-5qcq-268c?
GHSA-6v7p-5qcq-268c is a cross-site scripting vulnerability in zendframework/zend-navigation, 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
Many Zend Framework 2 view helpers were using the escapeHtml() view helper in order to escape HTML attributes, instead of the more appropriate escapeHtmlAttr(). In situations where user data and/or JavaScript is used to seed attributes, this can lead to potential cross site scripting (XSS) attack vectors.
Vulnerable view helpers include:
- All
Zend\Formview helpers. - Most
Zend\Navigation(akaZend\View\Helper\Navigation\*) view helpers. - All "HTML Element" view helpers:
htmlFlash(),htmlPage(),htmlQuickTime(). Zend\View\Helper\Gravatar
Which versions are affected by GHSA-6v7p-5qcq-268c?
4 open source packages ship an affected version, including zendframework/zend-navigation.
| Package | Affected | Fixed in |
|---|---|---|
zendframework/zend-navigation Packagist | From 2.0.0 | 2.2.7 |
zendframework/zend-navigation Packagist | From 2.0.0 | 2.2.7 |
zendframework/zend-navigation Packagist | From 2.3.0 | 2.3.1 |
zendframework/zend-navigation Packagist | From 2.3.0 | 2.3.1 |
How do I fix GHSA-6v7p-5qcq-268c?
Upgrade zendframework/zend-navigation to a fixed version for your release line: 2.2.7 or 2.3.1.
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-6v7p-5qcq-268c being exploited?
There is no known exploitation of GHSA-6v7p-5qcq-268c in the wild and no public exploit code.