FacturaScripts: Authenticated SQL injection in the FacturaScripts REST API filter parameter via parenthesis bypass in `Where::sqlColumn`
Critical severity. Published 14 July 2026. Update facturascripts/facturascripts to 2026.2 or later: composer update facturascripts/facturascripts.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| facturascripts/facturascripts (opens in a new tab) | <= 2026.1 | 2026.2 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show facturascripts/facturascripts
composer auditAdvisory details
| Severity | CriticalCVSS 9.9 |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-45262 (opens in a new tab) |
| GHSA | GHSA-5qmh-x653-g8qj (opens in a new tab) |
| Weakness | CWE-89, CWE-918 |
What the advisory says
Summary
Live PoC verified 2026-04-30 against a stock FacturaScripts master at 127.0.0.1:8081. A scoped ApiKey with fullaccess=0 and an ApiAccess row granting allowget=1 on the clientes resource only (no other rights, no UI session, no admin) issued one GET /api/3/clientes?filter[(0)UNION%20SELECT%20...]= request and the response body contained the raw bcrypt hash of the admin user's password ($2y$12$sLfA/XCqnjqLmYJwK.2V7eUHrHTHcQfkTYYfs1.lxX3OHrsmmkMGO) and the admin's logkey cookie value. The leaked logkey was injected into a fresh cookie jar and GET /AdminPlugins returned 200 with the admin plugin management UI.
Source: GHSA-5qmh-x653-g8qj (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- FacturaScripts: Path traversal in UploadedFile::move() via getClientOriginalName() — arbitrary file write outside MyFiles/ leading to RCE (critical, 14 July 2026)
- FacturaScripts: Unauthenticated Path Traversal in Static File Controllers Reads Private MyFiles Documents (high, 14 July 2026)
- FacturaScripts: Stored XSS in WidgetVariante and WidgetSubcuenta modal lists via HTML-attribute decoding of `Tools::noHtml`-escaped quotes inside `onclick=` (opens in a new tab) (low, 14 July 2026)
- FacturaScripts: CSV formula injection in CSVExport allows authenticated low-priv users to plant payloads that execute when an admin opens the export (high, 14 July 2026)
- FacturaScripts: Account takeover of any 2FA-enabled user (critical, 13 July 2026)