CVE-2026-42877
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedFacturaScripts is an open source accounting and invoicing software. In 2025.92 and earlier, a stored Cross-Site Scripting (XSS) vulnerability exists in the product search modal of sales (Core/Lib/AjaxForms/SalesModalHTML.php) and purchases documents (Core/Lib/AjaxForms/PurchasesModalHTML.php). An authenticated user with access to the warehouse module can create a product with a malicious reference that executes arbitrary JavaScript in the browser of any other user who opens the product search modal inside an invoice, order, or delivery note.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA stored Cross-Site Scripting vulnerability in FacturaScripts allows authenticated users with warehouse module access to inject malicious JavaScript through product reference fields. The payload persists in the database and executes in other users' browsers when they access the product search modal within sales or purchases documents (invoices, orders, delivery notes).
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify FacturaScripts installationLocate the FacturaScripts installation directory and check for the presence of core files such as 'facturascripts.ini' or the main index.php. Check the application version by examining the version file or the admin panel if accessible.Affected if FacturaScripts is not installed or the version is not within the affected range (if a version range is later defined).
-
Verify warehouse module statusLog into FacturaScripts as an administrator and navigate to the 'Modules' or 'Plugins' section. Check whether the Warehouse module is installed and enabled.Affected if The Warehouse module is enabled and active in the installation.
-
Check user warehouse access permissionsNavigate to Users > [Select User] > Permissions in the admin panel. Examine whether any user account has 'warehouse' or 'almacén' module permissions granted.Affected if At least one authenticated user has warehouse module access.
-
Inspect product reference data in databaseAccess the FacturaScripts database (typically MySQL or PostgreSQL). Query the products table (commonly 'productos' or similar) and examine the 'referencia' or 'reference' column for any suspicious patterns such as <script>, javascript:, onload, onerror, or other HTML/JavaScript tags.Affected if The 'referencia' field in any product record contains unescaped HTML or JavaScript code.
-
Verify modal rendering code for output encodingLocate the files SalesModalHTML.php and PurchasesModalHTML.php in the FacturaScripts directory. Inspect how they handle and display the product reference field - check if htmlspecialchars() or equivalent encoding is applied when rendering the reference in the product search modal.Affected if The modal files render product reference data without proper output encoding, allowing stored XSS to execute.
A user is affected if they have FacturaScripts with the warehouse module enabled, at least one user has warehouse access permissions, and malicious JavaScript payloads exist in the product reference field that render unescaped in the sales or purchases modal views.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedImplement strict input validation and sanitization for product reference fields on submission, and apply context-aware output encoding when rendering product data in the SalesModalHTML.php and PurchasesModalHTML.php modals.
FacturaScripts 2025.93 or later stable release
- 1. Identify the current FacturaScripts version by checking the admin panel or the version.php file
- 2. If running version 2025.92 or earlier, plan an upgrade to the latest stable release
- 3. Before upgrading, backup the database and all application files
- 4. Review the upgrade documentation specific to FacturaScripts for your deployment method
- 5. Perform the upgrade following official upgrade procedures
- 6. After upgrade, verify that the product search modal in Sales > Invoices, Orders, and Delivery Notes properly sanitizes product references
- 7. Test by creating a product with potential XSS characters in the reference field and confirming they are properly escaped when displayed in the modal
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-42877 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-42877 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data