MediumGHSA-4vf6-mq7w-3hp6

Zend_Filter_StripTags vulnerable to Cross-site Scripting when comments allowed

Published 7 Jun 2024 · Updated 7 Jun 2024

Affected packages

Affected
>=1.7.0 <1.7.9
Fixed in
1.7.9
Update to the fixed version for your release line, for example:composer require zendframework/zendframework1:^1.7.9
Affected
>=1.8.0 <1.8.5
Fixed in
1.8.5
Update to the fixed version for your release line, for example:composer require zendframework/zendframework1:^1.8.5
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

Zend_Filter_StripTags contained an optional setting to allow whitelisting HTML comments in filtered text. Microsoft Internet Explorer and several other browsers allow developers to create conditional functionality via HTML comments, including execution of script events and rendering of additional commented markup. By allowing whitelisting of HTML comments, a malicious user could potentially include XSS exploits within HTML comments that would then be rendered in the final output.

Is GHSA-4vf6-mq7w-3hp6 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.