MediumGHSA-hg35-vqp3-fv39

ZendFramework potential Cross-site Scripting vectors due to inconsistent encodings

Published 7 Jun 2024 · Updated 7 Jun 2024

Affected package

Affected
>=1.9.0 <1.9.7
Fixed in
1.9.7
Update to the fixed version for your release line, for example:composer require zendframework/zendframework1:^1.9.7

Details

A number of classes, primarily within the Zend_Form, Zend_Filter, Zend_Form, Zend_Log and Zend_View components, contained character encoding inconsistencies whereby calls to the htmlspecialchars() and htmlentities() functions used undefined or hard coded charset parameters. In many of these cases developers were unable to set a character encoding of their choice. These inconsistencies could, in specific circumstances, allow certain multibyte representations of special HTML characters pass through unescaped leaving applications potentially vulnerable to cross-site scripting (XSS) exploits. Such exploits would only be possible if a developer used a non-typical character encoding (such as UTF-7), allowed users to define the character encoding, or served HTML documents without a valid character set defined.

Is GHSA-hg35-vqp3-fv39 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected zendframework/zendframework1, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.