Miggo Logo

CVE-2023-1237: Answer vulnerable to Cross-site Scripting

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.24457%
Published
3/7/2023
Updated
3/13/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/answerdev/answergo< 1.0.61.0.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from client-side Markdown processing using the marked library without proper sanitization. The key indicators are:

  1. Removal of 'marked' import in the patch
  2. Removal of client-side HTML generation via marked.parse(commentMarkDown)
  3. Transition to server-side parsed_text handling in the patched version
  4. Direct storage of unsanitized user input's HTML output in parsed_text pre-patch
  5. CWE-79 alignment - raw user input was rendered as HTML without neutralization

The vulnerable code path involved taking user-controlled commentMarkDown, parsing it to HTML client-side, and storing/rendering it without adequate XSS protections.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*ross-sit* S*riptin* (XSS) - Stor** in *it*u* r*pository *nsw*r**v/*nsw*r prior to *.*.*.

Reasoning

T** vuln*r**ility st*ms *rom *li*nt-si** M*rk*own pro**ssin* usin* t** m*rk** li*r*ry wit*out prop*r s*nitiz*tion. T** k*y in*i**tors *r*: *. R*mov*l o* 'm*rk**' import in t** p*t** *. R*mov*l o* *li*nt-si** *TML **n*r*tion vi* m*rk**.p*rs*(*omm*ntM*