CVE-2022-2016: Cross-site Scripting in FacturaScripts
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.5013%
CWE
Published
6/10/2022
Updated
1/27/2023
KEV Status
No
Technology
PHP
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 |
|---|---|---|---|
| facturascripts/facturascripts | composer | <= 2022.08 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper input sanitization sequence in the Balance model's validation logic. The test() method originally validated the codbalance field with a regex check before applying HTML escaping, creating an XSS vector through validation error messages. The patch fixed this by moving the noHtml() sanitization to occur before validation. The unit tests added in the commit specifically verify HTML escaping behavior, confirming the pre-patch vulnerability in field handling.