CVE-2022-0087: Reflected cross-site scripting (XSS) vulnerability
7.1
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.97679%
CWE
Published
1/12/2022
Updated
2/3/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@keystone-6/auth | npm | < 1.0.2 | 1.0.2 |
@keystone-next/auth | npm | <= 37.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability stemmed from improper handling of the 'from' query parameter in two key areas: 1) In createAuth
's redirect generation, where untrusted input was embedded in URLs without context-aware validation()
. 2) In page components that directly consumed the 'from' parameter without sanitization. The fix introduced validation
checks (pathname === '/'
condition) and a useRedirect
hook to sanitize the parameter, confirming the original vulnerability existed in these parameter handling paths. The XSS exploit would occur when malicious 'from' values were reflected in admin UI responses without proper escaping.