Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with template or SendMail access
-
DeliveryPlant XSS payload in unsanitised notification body
-
ExploitVictim admin opens stored EmailSent row
-
ExecutionPayload bypasses limpiarJS regex sanitizer
-
ImpactScript runs in admin's shadow-root origin, hijacks session and CSRF tokens
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must hold an authenticated account with permission to edit EmailNotification templates OR with SendMail access, because EmailNotification::test() sanitises only name and subject and leaves body untouched, and SendMail::execAction accepts arbitrary HTML in the body parameter - this is the exact storage sink. The crafted body must use a payload class that evades the single-pass limpiarJS regex (nested/self-replicating <script>, unclosed <script>, javascript: URIs, <iframe srcdoc>, <style> @import, or HTML-entity-encoded variants). Exploitation is LIMITED by: (1) required privileged/authenticated attacker access (not unauthenticated), (2) required user interaction - a second administrator must navigate to and open the affected EmailSent row's HTML view to trigger getHtmlAction, and (3) affected versions are <= 2026.1 only; upgrading to 2026.2 is the fix. The open shadow DOM provides no sandbox, so once rendered the payload runs with full host-document privileges. |
| Impact | This is a genuine but moderate-priority issue, not an emergency. The signals are internally consistent: the supplied CVSS 3.1 vector (AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N) scores 4.8 (medium), and the vuln.today decision label is 'this_month' rather than act_now/emergency. Attack vector is network (AV:N) with low complexity (AC:L), but two strong brakes apply: the attacker must already hold a privileged, authenticated account (PR:H) to store the payload, and a second administrator must perform user interaction (UI:R) by opening the malicious EmailSent row before anything fires. This is therefore an authenticated, admin-to-admin stored XSS, not a drive-by remote compromise. The GHSA advisory contains a source-level analysis and a live-verified PoC (dated 2026-05-01) with a runnable transcript demonstrating four distinct limpiarJS regex-bypass classes, so working exploit material is publicly available - but there is NO CISA KEV listing and NO EPSS score in the provided data, so there is no evidence of active or widespread exploitation; realistic risk is targeted/insider rather than mass. One metric note: the input vector uses PR:H, but the advisory states that 'any user with SendMail access' (not only full admins) can plant the payload, which would justify PR:L - the true privilege bar may be lower than the input vector implies; verify the SendMail permission model against your deployment. Impact is partial (C:L/I:L) - session/CSRF-token theft and acting as the viewing admin - not full system takeover (A:N). |
| Exploit ScenarioDerived | An authenticated user who can manage EmailNotification templates (or who holds SendMail access) stores a crafted email body containing an XSS payload engineered to survive the client-side limpiarJS regex filter, such as the self-replicating '<<script>x</script>script>alert(1)</script>'. When an administrator later opens the resulting EmailSent row, EditEmailSent::getHtmlAction re-decodes the stored HTML via Tools::fixHtml and assigns it to innerHTML inside an open shadow root, executing the script in the admin's origin and capturing their session and CSRF tokens. The GHSA advisory includes a live-verified PoC (2026-05-01) confirming the bypass executes in the viewing administrator's session. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 04, 2026
Stored cross-site scripting in FacturaScripts 2026.1 and earlier lets an authenticated user who can edit EmailNotification templates, or who holds SendMail access, plant HTML in a notification body that executes in a second administrator's browser when that administrator opens the resulting EmailSent row's HTML view. The payload survives because EditEmailSent::getHtmlAction reverses the write-time Tools::noHtml escaping and the browser-side limpiarJS filter is a single-pass regex deny list that can be bypassed with nested or unclosed <script> tags, javascript: URIs, <iframe srcdoc> or HTML-entity tricks, and the open shadow root provides no sandbox. The flaw is fixed in 2026.2, is scored 4.8 by the CNA (PR:H) versus a PR:L vector in this assessment, is not in CISA KEV, and public PoC payloads are documented in the GitHub advisory GHSA-x9r7-ccmp-fq5p; the priority label is 'this month', so it is a moderate-priority issue rather than an emergency.
RemediationAI
Upgrade to FacturaScripts 2026.2, the vendor-released patch that closes the issue for the Composer package facturascripts/facturascripts (vulnerable through 2026.1); the release is published at https://github.com/NeoRazorX/facturascripts/releases/tag/v2026.2 and the technical detail, including the affected code paths and confirmed bypass classes, is in https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-x9r7-ccmp-fq5p. The advisory documents no separate workaround or configuration toggle, so upgrading is the complete fix. Because the two storage sinks are the unsanitised EmailNotification body and the arbitrary body parameter of SendMail::execAction, exposure is bounded while template-editing and SendMail permissions are restricted to administrators who are trusted to send mail to other administrators; that narrowing reduces the attacker population and the chance of a second admin opening a tainted EmailSent row, but it does not repair the sink and should be treated only as interim risk reduction until 2026.2 is deployed. Pending the upgrade, treat notification-template bodies and SendMail payloads from untrusted or delegated administrators as hostile input.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FacturaScripts is a PHP accounting/invoicing application using Twig view templates, and the flaw sits on the read path of stored e-mail HTML. At write time EmailSent::test() runs Tools::noHtml() over the html column, escaping the < > " ' characters; on read, Core/Controller/EditEmailSent.php getHtmlAction() returns that column through Tools::fixHtml(), an exact inverse that re-decodes the same characters, so the JSON delivered to the browser contains the original raw HTML the sender supplied. Core/View/Tab/EmailSentHtml.html.twig then builds a div, attaches an open shadow root (mode: "open"), and assigns limpiarJS(data.html) straight to html.innerHTML. limpiarJS is a hand-rolled deny list of four regex passes that strips <script>...</script> blocks and inline on* handlers once, without re-evaluating its own output and without covering nesting or unclosed tags, javascript:/data: URI attributes, srcdoc, formaction, stylesheet @import, or HTML-entity encoding that the browser decodes before URL resolution (the advisory also assigns CWE-184 for the incomplete list). Root cause class is CWE-79: untrusted stored content reaching an HTML sink with insufficient server-side encoding and an unreliable client-side sanitizer; the open shadow root is a DOM/CSS scoping mechanism only and inherits the host document's origin, cookies, storage and CSRF tokens, which is why the assessed vector is scope-changed. The storage sink is equally weak: EmailNotification::test() sanitises only name and subject and leaves body untouched, MailNotifier routes that body through NewMail into an HtmlBlock that is rendered with |raw into Email/NewTemplate.html.twig, and SendMail::execAction additionally accepts an arbitrary body parameter. The assessed prerequisites are an authenticated, low-privileged account (PR:L in this assessment, versus PR:H in the CNA vector) plus user interaction (UI:R) from a second administrator who opens the EmailSent HTML view; the trigger requires a payload class that evades the regex passes, and the advisory documents live PoC verification of those bypass classes against a self-hosted instance.
Know when Facturascripts gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Payload is stored by an authenticated user needing only SendMail/template access (PR:L), fires when a different admin views the row (UI:R), and XSS executes in the victim's context (S:C) stealing session data (C:L/I:L, A:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, EditEmailSent::getHtmlAction returns the stored EmailSent::html value through Tools::fixHtml(), which reverses the Tools::noHtml HTML-entity escaping that EmailSent::test() applied at write time. The browser-side Tab/EmailSentHtml.html.twig then assigns data.html straight to html.innerHTML inside an open shadow DOM after running it through a hand-rolled regex sanitizer (limpiarJS) that strips <script>...</script> blocks and inline event handlers via four regex passes. The filter is overlapping, single-pass, and oblivious to nested or unclosed tags, alternative XSS sinks (javascript: URIs, <iframe srcdoc>, <style> import), or HTML entity tricks. Several payloads survive intact and execute because the shadow root inherits the parent document's origin and JavaScript privileges, giving the attacker the viewing admin's session, CSRF tokens, and any DOM data on the page. Storage of the payload is straightforward: EmailNotification::test() only sanitises name and subject, leaving body untouched, so an admin who can manage notification templates plants the payload once and every administrator who later opens an EmailSent row generated from that template fires it. This issue has been patched in version 2026.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
More in Facturascripts
View allAccount Takeover in GitHub repository neorazorx/facturascripts prior to 2022.07. Rated critical severity (CVSS 9.8), thi
FacturaScripts is open-source enterprise resource planning and accounting software. [CVSS 8.8 HIGH]
Authenticated users can execute arbitrary SQL commands against FacturaScripts REST API endpoints through unsanitized sor
FacturaScripts versions 2025.71 and earlier contain a stored XSS vulnerability in the Observations field that executes a
Cross-site Scripting (XSS) - Reflected in GitHub repository neorazorx/facturascripts prior to 2022.06. Rated medium seve
Cross-site Scripting (XSS) - Generic in GitHub repository neorazorx/facturascripts prior to 2022.09. Rated medium severi
Reflected Xss using url based payload in GitHub repository neorazorx/facturascripts prior to 2022.07. Rated medium sever
Cross-site scripting - Reflected in Create Subaccount in GitHub repository neorazorx/facturascripts prior to 2022.07. Ra
Authenticated path traversal in FacturaScripts 2025 through 2026.2 lets any user or API token holding upload rights writ
Reflected cross-site scripting in FacturaScripts prior to version 2025.8 allows authenticated attackers to inject malici
Cross-site Scripting (XSS) - Stored in GitHub repository neorazorx/facturascripts prior to 2022.06. Rated medium severit
Cross-site Scripting (XSS) - Reflected in GitHub repository neorazorx/facturascripts prior to 2022.1. Rated medium sever
EUVD-2026-144501
NVD
CVE.org
GitHub
Exploit-DB