Miggo Logo

CVE-2022-31191: JSPUI spellcheck and autocomplete tools vulnerable to Cross Site Scripting

7.1

CVSS Score
3.1

Basic Information

EPSS Score
0.31573%
Published
8/6/2022
Updated
1/31/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.dspace:dspace-jspuimaven>= 4.0, < 5.115.11
org.dspace:dspace-jspuimaven>= 6.0, < 6.46.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two locations in discovery.jsp: 1) The autocomplete's JavaScript template used unescaped item.displayedValue in label construction (fixed by adding escapeHtml()). 2) The spellcheck feature rendered spellCheckQuery directly without escaping in HTML text context (fixed by adding Utils.addEntities()). Both locations directly output user-controlled data without proper escaping, meeting XSS vulnerability criteria.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** JSPUI sp*ll****k "*i* you m**n" *TML *s**p*s t** **t*-sp*ll *ttri*ut* in t** link, *ut not t** **tu*l *ispl*y** t*xt. Simil*rly, t** JSPUI *uto*ompl*t* *TML *o*s not prop*rly *s**p* t*xt p*ss** to it. *ot* *r* vuln*r**l* to XSS. T*is

Reasoning

T** vuln*r**ility st*ms *rom two lo**tions in `*is*ov*ry.jsp`: *) T** *uto*ompl*t*'s J*v*S*ript t*mpl*t* us** un*s**p** it*m.*ispl*y**V*lu* in l***l *onstru*tion (*ix** *y ***in* `*s**p**tml()`). *) T** sp*ll****k ***tur* r*n**r** `sp*ll****kQu*ry` *