CVE-2021-3938: snipe-it is vulnerable to Cross-site Scripting
3.9
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.38376%
CWE
Published
11/15/2021
Updated
9/15/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
snipe/snipe-it | composer | <= 5.3.1 | 5.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The GitHub patch shows the vulnerability was fixed by adding e() HTML entity escaping to $request->input('asset_tag') in the error message construction. The original unpatched line (return response()->json(... $request->input('asset_tag') ...)) directly embeds user-controlled input into a response without escaping, making it susceptible to XSS. The audit method in AssetsController.php is the only function modified in the security patch, confirming this as the vulnerable entry point.