CVE-2026-45262: Critical FacturaScripts SQL Injection
Critical CVSS (9.9) reachable over network.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HTL;DR - CVE-2026-45262 is a critical authenticated SQL injection in FacturaScripts API filtering, rated CVSS 9.9. - FacturaScripts versions before 2026.2 are affected; low-privilege API users may access unauthorized database data. - A working proof of concept is reported, but CISA KEV does not currently confirm exploitation in the wild. - Upgrade to FacturaScripts 2026.2 or later, restrict API access, rotate exposed credentials, and investigate suspicious filter parameters.
CVE-2026-45262 is a critical FacturaScripts SQL injection vulnerability affecting API filtering in versions before 2026.2. The authenticated SQL injection can allow a low-privilege API user to manipulate generated database queries and access information beyond the user’s intended permissions.
The vendor reports a working proof of concept against a stock deployment. The test used a scoped API key with limited access but reportedly disclosed administrator-related information, including a bcrypt password hash and logkey value.
Analyst’s Take: Treat this as an authenticated access-control failure, not merely an input-validation defect. The reported proof of concept crossed the scoped API key’s intended resource boundary, so upgrading and reviewing credential exposure should take priority over waiting for confirmed exploitation.
Vulnerability Summary
| Field | Details |
|---|---|
| CVE ID | CVE-2026-45262 |
| CVSS v3.1 score | 9.9 Critical |
| CVSS vector | AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| Attack vector | Network |
| Privileges required | Low-privilege authenticated account or API key |
| User interaction | None |
| Affected product | NeoRazorX FacturaScripts |
| Affected versions | Versions before 2026.2, including 2026.1 and earlier |
| Fixed version | FacturaScripts 2026.2 |
| Public proof of concept | Yes, reported in the vendor advisory |
| CISA KEV status | Not listed as of December 4, 2026 |
The vulnerability affects API filtering, including the standard API model filtering path and the attached-files API path. It does not require an unauthenticated request, but API keys and low-privilege accounts can be compromised, over-permissioned, shared, or exposed through integrations.
For background on security operations responsibilities, see our SOC and NOC comparison.
What Is the Root Cause?
The root cause is inadequate validation and escaping of attacker-controlled API filter field names.
FacturaScripts accepts request keys from:
$_GET['filter'][$key]
Those keys are passed into filtering logic that creates a DataBaseWhere object. The field name eventually reaches Where::sqlColumn() during SQL generation.
Under normal conditions, a column identifier should be validated against an allowlist or safely quoted according to the database engine’s identifier rules. In the affected implementation, a parenthesis-related exception can allow a field name containing both an opening and closing parenthesis to avoid expected identifier escaping.
The application may then concatenate attacker-controlled content into a condition resembling:
WHERE <attacker-controlled-expression> = '<value>'
This is a structural SQL injection. The attacker is not limited to supplying an ordinary value; the crafted filter key can alter the expression evaluated by the database.
The reported proof of concept uses a pattern similar to:
filter[(0)UNION SELECT ...]
The NVD description gives an example pivot resembling:
WHERE (0)UNION SELECT ... FROM users WHERE(nick='admin')-- = 'value'
The issue is compounded by duplicated filtering logic. Relevant paths include:
APIModel::getWhereValuesApiAttachedFiles::getWhereValues
Hardening only one path could leave the other exposed. Any local patch or backport should verify that both paths receive equivalent protection.
What Happened?
CVE-2026-45262 is an authenticated SQL injection vulnerability in FacturaScripts, an open-source accounting and invoicing application. The flaw allows an authenticated API user to manipulate the SQL query generated by the application through crafted filter parameters.
Depending on the affected query path and database permissions, exploitation may allow an attacker to:
- Read unauthorized database records.
- Access administrator-related information.
- Modify data.
- Affect application or database availability.
- Bypass the intended scope of an API key.
The vendor’s advisory reports a working proof of concept against a stock installation. A scoped API key with limited access reportedly disclosed information outside its intended resource scope, including the bcrypt hash of the administrator password and the administrator’s logkey value.
The practical impact varies by deployment. It depends on the API endpoint exposed, the privileges assigned to the API identity, the database account used by FacturaScripts, and the information returned by the vulnerable query path.
Who Is Affected?
All FacturaScripts installations running versions before 2026.2 should be considered affected. This includes FacturaScripts 2026.1 and earlier.
Inventory both internet-facing and internally accessible deployments. An attacker may reach an internal installation through:
- A compromised workstation.
- A stolen VPN or remote-access account.
- An exposed integration credential.
- Another compromised application on the same network.
- A misconfigured reverse proxy or firewall.
The vulnerability requires an API key or account with sufficient access to reach an affected API resource. However, administrator privileges are not necessarily required. The CVSS vector assigns PR:L, meaning a low-privilege authenticated identity may be enough to submit crafted filter keys.
| Deployment condition | Required action |
|---|---|
| FacturaScripts before 2026.2 | Upgrade to 2026.2 or later immediately |
| FacturaScripts 2026.2 or later | Confirm the running code is the intended fixed release |
| API exposed to the internet | Restrict access by network, reverse proxy, VPN, or integration allowlist |
| Broad or long-lived API keys | Revoke unnecessary keys, reduce permissions, and rotate credentials |
| Evidence of crafted filters | Preserve logs, investigate database access, and rotate potentially exposed credentials |
| Local patch or fork | Confirm both affected filtering paths receive equivalent hardening |
The fixed version identified by the vendor is FacturaScripts 2026.2. If an organization cannot upgrade immediately, it should obtain a vendor-supported backport rather than assume that a generic web application firewall rule completely addresses the vulnerability.
Why Is the CVSS Score 9.9?
The vendor-reported CVSS v3.1 vector is:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
The 9.9 Critical score reflects a network-reachable vulnerability with low attack complexity and no user interaction. An attacker needs authentication, but only low privileges may be required.
| CVSS component | Value | Practical meaning |
|---|---|---|
| Attack Vector | AV:N |
The vulnerable API can be reached over a network |
| Attack Complexity | AC:L |
Exploitation does not require unusual conditions |
| Privileges Required | PR:L |
A low-privilege account or API key may be sufficient |
| User Interaction | UI:N |
No separate victim action is required |
| Scope | S:C |
Impact can cross the vulnerable component’s security authority |
| Confidentiality | C:H |
Sensitive database information may be disclosed |
| Integrity | I:H |
Data modification may be possible depending on permissions |
| Availability | A:H |
Database or application availability may be affected |
The high impact ratings do not prove that every deployment allows arbitrary writes or full database takeover. The available information establishes that unauthorized data retrieval is possible, while modification and availability impacts depend on the affected path and database permissions.
Defenders should assess the actual database account used by FacturaScripts and apply least privilege to the application schema.
Has CVE-2026-45262 Been Exploited?
A public proof of concept is reported in the vendor’s GitHub security advisory. The described test targeted a stock FacturaScripts deployment through the clientes API endpoint and used a scoped API key with limited access.
The crafted request included a filter key resembling an SQL UNION expression. The advisory reports disclosure of sensitive records, including:
- The administrator password’s bcrypt hash.
- The administrator’s
logkey. - Data from tables outside the API key’s intended resource scope.
This demonstrates practical exploitability but does not establish confirmed exploitation by a threat actor.
As of December 4, 2026:
- Public proof of concept: Yes.
- Working exploit demonstration: Yes, according to the vendor advisory.
- Confirmed exploitation in the wild: Not identified.
- CISA KEV listing: No.
- Ransomware campaign designation: None identified.
- Named threat actor attribution: None identified.
CISA’s Known Exploited Vulnerabilities catalog does not currently list CVE-2026-45262. That absence does not prove that exploitation has not occurred. Organizations should use the public proof of concept and critical impact to prioritize remediation rather than wait for a KEV listing.
Related Security Guidance
Organizations reviewing this vulnerability may also benefit from guidance on:
Detection Guidance
Detection should begin with asset and version inventory. Identify every FacturaScripts instance, its release version, exposed API routes, API keys, and database account privileges.
Any installation before 2026.2 should be treated as exposed until upgraded or otherwise remediated.
Review reverse-proxy, web-server, application, and database logs for requests containing unusual filter keys. The most useful indicators are SQL syntax embedded in parameter names rather than only in parameter values.
Search for filter[ parameters containing:
- Parentheses.
UNIONorSELECT.- SQL comments.
- Quote characters.
- Database keywords.
- References to sensitive tables.
- Repeated changes to projected columns.
- Unusually large API responses.
Log Detection Example
A generic web-server or reverse-proxy search might include:
grep -Eai \
'filter%5B|filter\[|(\(|\)).*(union|select|from|where)|union(\+|%20|[[:space:]])+select|(--|%23|/\*)' \
/var/log/nginx/access.log /var/log/apache2/access.log
For centralized logs, a conceptual query can search decoded request targets and parameter names:
http.request.uri contains "filter[" and
(
http.request.uri matches "(?i)(union|select|from|where|information_schema|--|%23|/\\*|\\(|\\))"
)
A suspicious request may resemble the following after URL decoding:
GET /api/2/clientes?filter[(0)UNION%20SELECT%20...]=x HTTP/1.1
Do not rely exclusively on response status codes. A successful injection may return HTTP 200, while an unsuccessful attempt may return a generic 4xx or 5xx response.
Correlate request logs with:
- API identities.
- Source addresses.
- Response sizes.
- Database query errors.
- Subsequent authentication activity.
- Access to user or credential-related records.
- API keys accessing resources outside their normal business function.
If compromise is suspected, preserve logs before rotation, capture the deployed FacturaScripts version and code hash, and review database audit logs where available.
A bcrypt hash disclosure should be treated as credential exposure. Although bcrypt is designed to resist rapid reversal, the associated password may be reused elsewhere, and related tokens or keys may be directly usable.
Remediation and Patching
The primary remediation is to upgrade FacturaScripts to 2026.2 or later, the fixed version identified by the vendor.
Before upgrading:
- Back up the application and database.
- Test the release in a representative environment.
- Review integrations that use API filters.
- Confirm the deployment process and rollback plan.
- Verify that the database account and application configuration are preserved securely.
A generic source checkout procedure may look like this:
git fetch --tags origin
git checkout v2026.2
# Run the project's documented dependency and database migration steps.
# Restart the application and verify the reported FacturaScripts version.
After deployment, verify that both the standard API model filtering path and the attached-files API path are running the corrected code.
If an immediate upgrade is impossible, reduce exposure:
- Restrict FacturaScripts API access to trusted networks.
- Place the API behind an allowlist-capable reverse proxy.
- Revoke unused API keys.
- Reduce API resource permissions.
- Disable unnecessary integrations.
- Apply least privilege to the FacturaScripts database account.
- Monitor for crafted filter parameters.
These controls reduce attack paths and potential impact, but they do not remove the vulnerable code.
Temporary Network Restriction
A reverse proxy or firewall rule should restrict untrusted access to the FacturaScripts API rather than attempt to parse every possible SQL injection encoding.
For example:
location /api/ {
allow 10.0.0.0/8;
allow 192.168.0.0/16;
deny all;
proxy_pass http://facturascripts_backend;
}
The exact API path and trusted ranges must match the deployment. Test the configuration carefully to avoid disrupting legitimate integrations or administrative access.
Verify the Fixed Deployment
After upgrading, confirm the deployed release and search the source tree for the relevant filtering implementation:
git describe --tags --always
grep -RIn --include='*.php' \
-E 'function[[:space:]]+sqlColumn|function[[:space:]]+getWhereValues' .
If a local backport is necessary, do not alter only one controller. The remediation must ensure that attacker-controlled filter field names cannot become SQL expressions in both:
APIModel::getWhereValuesApiAttachedFiles::getWhereValues
Prefer strict field-name allowlists and parameterized query construction. A web application firewall rule may provide temporary defense in depth, but it cannot reliably replace the code fix because SQL syntax can be encoded or expressed in multiple ways.
Credential Rotation and Incident Response
Treat potentially exposed credentials and secrets as compromised.
Rotate:
- FacturaScripts API keys.
- FacturaScripts user credentials.
- Administrator passwords.
- Database credentials, where feasible.
- Tokens or secrets stored in fields that may have been readable through SQL injection.
- Credentials reused on other services.
After updating the application, review database permissions and continue monitoring for replay of exposed keys. Search for suspicious authentication, unusual API access, unexpected data exports, and persistence mechanisms.
Organizations with evidence of exploitation should preserve forensic data before making destructive changes. At minimum, retain relevant web-server, reverse-proxy, application, database, identity-provider, and endpoint logs.
References
- NVD: CVE-2026-45262
- FacturaScripts GitHub Security Advisory: GHSA-5qmh-x653-g8qj
- FacturaScripts v2026.2 release
- CISA Known Exploited Vulnerabilities Catalog
This article may contain affiliate links. We earn a commission on qualifying purchases at no extra cost to you.