Miggo Logo

GHSA-gwpm-pm6x-h7rj: ZendFramework Cross-site Scripting vector in `Zend_Filter_StripTags`

6.1

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
6/7/2024
Updated
6/7/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
zendframework/zendframework1composer>= 1.7.0, < 1.7.61.7.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from how Zend_Filter_StripTags processes HTML attributes. The _validateAttributes method is responsible for checking allowed attributes using regular expressions that didn't account for whitespace/newlines around attribute assignment operators. This allowed malicious attributes like 'onclick' with line breaks around the '=' to bypass the whitelist check. The advisory specifically references attribute whitelisting functionality in this class as the vulnerable component, and the patched version (1.7.6) would have modified this validation logic.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

`Z*n*_*ilt*r_StripT**s` is * *ilt*rin* *l*ss *n*lo*ous to P*P's `strip_t**s()` *un*tion. In ***ition to strippin* *TML t**s *n* s*l**tiv*ly k**pin* t*os* provi*** in * w*it*list, it *lso provi**s t** **ility to w*it*list sp**i*i* *ttri*ut*s to r*t*in

Reasoning

T** vuln*r**ility st*ms *rom *ow Z*n*_*ilt*r_StripT**s pro**ss*s *TML *ttri*ut*s. T** _v*li**t**ttri*ut*s m*t*o* is r*sponsi*l* *or ****kin* *llow** *ttri*ut*s usin* r**ul*r *xpr*ssions t**t *i*n't ***ount *or w*it*sp***/n*wlin*s *roun* *ttri*ut* *ss