CVE-2023-0934: Answer vulnerable to Cross-site Scripting
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.19057%
CWE
Published
2/21/2023
Updated
3/6/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/answerdev/answer | go | < 1.0.5 | 1.0.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing input sanitization in the site configuration update flow. The patch added a new Sanitizer validation directive using bluemonday's UGCPolicy to critical fields in SiteGeneralReq. Prior to 1.0.5, the UpdateGeneral controller endpoint accepted and stored these fields (Name, ShortDescription, etc.) without proper HTML escaping, as evidenced by the addition of 'sanitizer' validation tags in the schema and the new Sanitizer function in the validator. The combination of unsanitized storage in siteinfo_controller.go and missing validation rules in siteinfo_schema.go created the XSS vulnerability.