Skip to main content

FacturaScripts EUVDEUVD-2026-144501

| CVE-2026-77529 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-12-04 GitHub_M
4.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with template or SendMail access
  2. Delivery
    Plant XSS payload in unsanitised notification body
  3. Exploit
    Victim admin opens stored EmailSent row
  4. Execution
    Payload bypasses limpiarJS regex sanitizer
  5. Impact
    Script 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

facturascripts < 2026.2

Affected Packages

euvd facturascripts fix: 2026.2

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

Vendor (GitHub_M) PRIMARY 4.8 MEDIUM
AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

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).

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Dec 04, 2026 - 18:02 EUVD

DescriptionCVE.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

Prevalence
Low
niche open-source SMB accounting/invoicing app, limited enterprise footprint
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2022-1715 CRITICAL POC
9.8 May 13

Account Takeover in GitHub repository neorazorx/facturascripts prior to 2022.07. Rated critical severity (CVSS 9.8), thi

CVE-2026-25514 HIGH POC
8.8 Feb 04

FacturaScripts is open-source enterprise resource planning and accounting software. [CVSS 8.8 HIGH]

CVE-2026-25513 HIGH POC
8.8 Feb 04

Authenticated users can execute arbitrary SQL commands against FacturaScripts REST API endpoints through unsanitized sor

CVE-2026-23997 HIGH POC
8.0 Feb 02

FacturaScripts versions 2025.71 and earlier contain a stored XSS vulnerability in the Observations field that executes a

CVE-2022-2066 MEDIUM POC
6.1 Jun 13

Cross-site Scripting (XSS) - Reflected in GitHub repository neorazorx/facturascripts prior to 2022.06. Rated medium seve

CVE-2022-1988 MEDIUM POC
6.1 Jun 03

Cross-site Scripting (XSS) - Generic in GitHub repository neorazorx/facturascripts prior to 2022.09. Rated medium severi

CVE-2022-1682 MEDIUM POC
6.1 May 12

Reflected Xss using url based payload in GitHub repository neorazorx/facturascripts prior to 2022.07. Rated medium sever

CVE-2022-1571 MEDIUM POC
6.1 May 04

Cross-site scripting - Reflected in Create Subaccount in GitHub repository neorazorx/facturascripts prior to 2022.07. Ra

CVE-2026-77526 CRITICAL
9.9 Dec 04

Authenticated path traversal in FacturaScripts 2025 through 2026.2 lets any user or API token holding upload rights writ

CVE-2026-23476 MEDIUM POC
5.4 Feb 02

Reflected cross-site scripting in FacturaScripts prior to version 2025.8 allows authenticated attackers to inject malici

CVE-2022-2065 MEDIUM POC
5.4 Jun 13

Cross-site Scripting (XSS) - Stored in GitHub repository neorazorx/facturascripts prior to 2022.06. Rated medium severit

CVE-2022-2016 MEDIUM POC
5.4 Jun 09

Cross-site Scripting (XSS) - Reflected in GitHub repository neorazorx/facturascripts prior to 2022.1. Rated medium sever

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy