CVE-2026-23997: Facturascripts/facturascripts Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-4v7v-7v7r-3r5h
CVSS 8.0
CWE-79
Published
Advisory Summary

CVE-2026-23997 is a HIGH (CVSS 8.0) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Facturascripts/facturascripts libraries in the Packagist ecosystem. The issue involves facturascripts has stored cross-site scripting (xss) in "observations" field via history view. Remediation is available in the latest vendor maintenance releases.

CVE-2026-23997 at a Glance

CVE Identifier CVE-2026-23997
GHSA Identifier GHSA-4v7v-7v7r-3r5h
Severity HIGH
CVSS v3.1 Base Score 8.0
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Facturascripts/facturascripts
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-23997

To remediate this vulnerability, upgrade all affected Facturascripts/facturascripts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

facturascripts/facturascripts fixed: Latest secure release
Upgrade facturascripts/facturascripts to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for facturascripts/facturascripts

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-23997, inspect your project dependencies for Facturascripts/facturascripts:

inspect dependencies for facturascripts/facturascripts

Analyze the terminal output to locate any version of Facturascripts/facturascripts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Facturascripts/facturascripts, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A Stored Cross-Site Scripting (XSS) vulnerability was discovered in the Observations field. The flaw occurs in the History view, where historical data is rendered without proper HTML entity encoding. This allows an attacker to execute arbitrary JavaScript in the browser of viewing the history by administrators. ### Details When an administrator views the History tab of that specific note, the script executes in their browser session. ### PoC 1. Log in as a regular user. 2. Open "Sales"=>"Customers"=> "Delivery Notes" <img width="818" height="223" alt="image" src="https://github.com/user-attachments/assets/82518644-2676-42db-93b1-86133986276c" /> 3. Chose one of the customer or create the new one. 4. Open "Delivery notes" <img width="2078" height="713" alt="image" src="https://github.com/user-attachments/assets/f7e5027f-e574-4807-9e9c-bf8a51bc1fff" /> 5. Create a new Delivery Note or edit an existing one. Fill the "Number 2" field with any value and save. <img width="2097" height="739" alt="image" src="https://github.com/user-attachments/assets/a3ca5ccb-3d9a-4cfc-a991-16206a1a862b" /> <img width="2097" height="858" alt="image" src="https://github.com/user-attachments/assets/9ca39755-4be6-4303-ab3c-b589cd222daf" /> 6. In the Observations field, enter the malicious JavaScript and save it again. <img width="2097" height="870" alt="image" src="https://github.com/user-attachments/assets/f189c53b-8b73-44e8-bb18-bd46f37cef4f" /> <img width="1539" height="885" alt="image" src="https://github.com/user-attachments/assets/b2d20eb1-246e-4acc-b904-77bc85373873" /> 7. Now we have record in "History" tab. <img width="2096" height="768" alt="image" src="https://github.com/user-attachments/assets/6b76d7d4-fc2c-4eb1-9137-4e4ba7287b9b" /> 8. Logout and login as admin. Next go to the "History" tab with malicious code: <img width="1730" height="702" alt="image" src="https://github.com/user-attachments/assets/54f4af37-72f3-47a0-9669-2b1f6293f2b4" /> <img width="1749" height="670" alt="image" src="https://github.com/user-attachments/assets/f7689083-0128-473c-a4e2-1898e801df78" /> <img width="1479" height="587" alt="image" src="https://github.com/user-attachments/assets/4a6d6e4e-4645-4566-be92-9964c470456e" /> <img width="1541" height="505" alt="image" src="https://github.com/user-attachments/assets/484d9e5f-596a-4508-a9cb-752e16e6564f" /> <img width="2095" height="904" alt="image" src="https://github.com/user-attachments/assets/5462f11c-b274-40e6-af00-d10e7fc1e855" /> Result: Upon opening the history record, the onerror event triggers, executing the JavaScript and displaying an alert box with the application's origin. ### Impact Change admin password via XSS: <img width="2094" height="1260" alt="image" src="https://github.com/user-attachments/assets/7598f986-0618-46e1-9dc7-64655975b19e" /> <img width="1584" height="1137" alt="image" src="https://github.com/user-attachments/assets/3e2302bc-01a3-4c47-ba9a-e69413e932b3" /> <img width="2084" height="373" alt="image" src="https://github.com/user-attachments/assets/21523278-5bcc-4743-8557-4b6563a127d0" /> <img width="1665" height="787" alt="image" src="https://github.com/user-attachments/assets/eca4d5b7-5dec-410f-9c59-99084821e350" /> Admin password was changed <img width="1488" height="598" alt="image" src="https://github.com/user-attachments/assets/53d3f4c1-accd-4136-8235-0fe5b287bbfe" /> This vulnerability results in a Critical Full Account Takeover, allowing any user with note-editing permissions to seize control of the admin account. It successfully bypasses CSRF protections and exploits the lack of "current password" verification during credential changes. Once compromised, the attacker gains total access to the system's management, sensitive financial data, and user configurations. ### Technical requirements & Complexity The attack requires prior technical knowledge of the internal API structure (field names and required values), which can be obtained by a legitimate user through browser developer tools. While it requires the target's code (e.g., admin), this is a common default value in most installations.

CVE-2026-23997 Affected Facturascripts/facturascripts Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
facturascripts/facturascripts
Packagist
≤ 2025.71

References

Frequently Asked Questions

What is CVE-2026-23997?
CVE-2026-23997 is a security vulnerability in Facturascripts/facturascripts involving FacturaScripts has Stored Cross-Site Scripting (XSS) in "Observations" field via History View under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Facturascripts/facturascripts versions are affected?
Affected versions include releases prior to current release patches across affected packages: facturascripts/facturascripts.
What version fixes CVE-2026-23997?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is facturascripts/facturascripts affected?
Yes, facturascripts/facturascripts is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-23997?
CVE-2026-23997 has a CVSS v3.1 base score of 8.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-23997?
CVE-2026-23997 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2026-23997?
Run the dependency tree command: 'inspect dependencies for facturascripts/facturascripts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4v7v-7v7r-3r5h",
  "modified" : "2026-02-03T16:12:21Z",
  "published" : "2026-02-02T18:17:33Z",
  "aliases" : [ "CVE-2026-23997" ],
  "summary" : "FacturaScripts has Stored Cross-Site Scripting (XSS) in \"Observations\" field via History View",
  "details" : "### Summary\nA Stored Cross-Site Scripting (XSS) vulnerability was discovered in the Observations field. The flaw occurs in the History view, where historical data is rendered without proper HTML entity encoding. This allows an attacker to execute arbitrary JavaScript in the browser of  viewing the history by administrators.\n\n### Details\nWhen an administrator views the History tab of that specific note, the script executes in their browser session.\n\n### PoC\n\n1. Log in as a regular user.\n2. Open \"Sales\"=>\"Customers\"=> \"Delivery Notes\"\n<img width=\"818\" height=\"223\" alt=\"image\" src=\"https://github.com/user-attachments/assets/82518644-2676-42db-93b1-86133986276c\" />\n\n3.  Chose one of the customer or create the new one.\n\n4. Open \"Delivery notes\"\n<img width=\"2078\" height=\"713\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f7e5027f-e574-4807-9e9c-bf8a51bc1fff\" />\n5. Create a new Delivery Note or edit an existing one. Fill the \"Number 2\" field with any value and save.\n<img width=\"2097\" height=\"739\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a3ca5ccb-3d9a-4cfc-a991-16206a1a862b\" />\n<img width=\"2097\" height=\"858\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9ca39755-4be6-4303-ab3c-b589cd222daf\" />\n6. In the Observations field, enter the malicious JavaScript and save it again.\n<img width=\"2097\" height=\"870\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f189c53b-8b73-44e8-bb18-bd46f37cef4f\" />\n<img width=\"1539\" height=\"885\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b2d20eb1-246e-4acc-b904-77bc85373873\" />\n7. Now we have record in \"History\" tab.\n<img width=\"2096\" height=\"768\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6b76d7d4-fc2c-4eb1-9137-4e4ba7287b9b\" />\n8. Logout and login as admin. Next go to the \"History\" tab with malicious code:\n<img width=\"1730\" height=\"702\" alt=\"image\" src=\"https://github.com/user-attachments/assets/54f4af37-72f3-47a0-9669-2b1f6293f2b4\" />\n<img width=\"1749\" height=\"670\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f7689083-0128-473c-a4e2-1898e801df78\" />\n<img width=\"1479\" height=\"587\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4a6d6e4e-4645-4566-be92-9964c470456e\" />\n<img width=\"1541\" height=\"505\" alt=\"image\" src=\"https://github.com/user-attachments/assets/484d9e5f-596a-4508-a9cb-752e16e6564f\" />\n<img width=\"2095\" height=\"904\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5462f11c-b274-40e6-af00-d10e7fc1e855\" />\n\nResult: Upon opening the history record, the onerror event triggers, executing the JavaScript and displaying an alert box with the application's origin.\n\n### Impact\n\nChange admin password via XSS:\n<img width=\"2094\" height=\"1260\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7598f986-0618-46e1-9dc7-64655975b19e\" />\n<img width=\"1584\" height=\"1137\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3e2302bc-01a3-4c47-ba9a-e69413e932b3\" />\n<img width=\"2084\" height=\"373\" alt=\"image\" src=\"https://github.com/user-attachments/assets/21523278-5bcc-4743-8557-4b6563a127d0\" />\n<img width=\"1665\" height=\"787\" alt=\"image\" src=\"https://github.com/user-attachments/assets/eca4d5b7-5dec-410f-9c59-99084821e350\" />\nAdmin password was changed\n<img width=\"1488\" height=\"598\" alt=\"image\" src=\"https://github.com/user-attachments/assets/53d3f4c1-accd-4136-8235-0fe5b287bbfe\" />\n\nThis vulnerability results in a Critical Full Account Takeover, allowing any user with note-editing permissions to seize control of the admin account. It successfully bypasses CSRF protections and exploits the lack of \"current password\" verification during credential changes. Once compromised, the attacker gains total access to the system's management, sensitive financial data, and user configurations.\n\n### Technical requirements & Complexity\nThe attack requires prior technical knowledge of the internal API structure (field names and required values), which can be obtained by a legitimate user through browser developer tools. While it requires the target's code (e.g., admin), this is a common default value in most installations.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "facturascripts/facturascripts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2025.71"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-4v7v-7v7r-3r5h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-23997"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NeoRazorX/facturascripts"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-02T18:17:33Z",
    "nvd_published_at" : "2026-02-02T23:16:07Z"
  }
}