Miggo Logo

CVE-2019-25095: LdapCherry Cross-site Scripting vulnerbaility

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.21933%
Published
1/5/2023
Updated
9/27/2024
KEV Status
No
Technology
TechnologyPython

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
ldapcherrypip< 1.0.01.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key patterns: 1) Use of base64 encoding (instead of URL-safe encoding) for user-controlled redirect URLs in _check_auth, which bypassed proper escaping. 2) Direct use of decoded URL parameters in login redirection without sanitization. The commit diff shows replacement of base64 with urllib.quote_plus and template escaping improvements, confirming these functions were the injection points. The templates' ${form} and ${roles} variables also lacked HTML escaping filters before the patch, but these are template-level issues rather than discrete functions.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* vuln*r**ility, w*i** w*s *l*ssi*i** *s pro*l*m*ti*, w*s *oun* in k*kw* L**p***rry up to *.x. *****t** is *n unknown *un*tion o* t** *ompon*nt URL **n*l*r. T** m*nipul*tion l***s to *ross sit* s*riptin*. It is possi*l* to l*un** t** *tt**k r*mot*ly.

Reasoning

T** vuln*r**ility st*ms *rom two k*y p*tt*rns: *) Us* o* **s*** *n*o*in* (inst*** o* URL-s*** *n*o*in*) *or us*r-*ontroll** r**ir**t URLs in _****k_*ut*, w*i** *yp*ss** prop*r *s**pin*. *) *ir**t us* o* ***o*** URL p*r*m*t*rs in lo*in r**ir**tion wit