Categories
CVE-2026-42877 medium CVSS 5.4

Cross-Site Scripting (XSS) in facturascripts/facturascripts (CVE-2026-42877)

Summary

Cross-site scripting in facturascripts/facturascripts (CVE-2026-42877). Risk of unauthorized operations or information disclosure. Exploitable via referencia.

Original description

The description as published by the source.

Summary

A stored Cross-Site Scripting (XSS) vulnerability exists in the product search modal of sales and purchases documents. 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.

Affected files

  • Core/Lib/AjaxForms/SalesModalHTML.php
  • Core/Lib/AjaxForms/PurchasesModalHTML.php

Vulnerability details

The referencia field of a product variant is injected directly into an HTML onclick attribute string without JavaScript context escaping:

// SalesModalHTML.php ~line 102
$tbody .= '';

When a product is saved, noHtml() encodes ' → '. This appears safe in static HTML context. However, the modal HTML is later returned as a JSON response and inserted into the DOM via innerHTML:

// SalesDocument.html.twig line 118
document.getElementById("findProductList").innerHTML = data.products;

The browser HTML parser decodes ' → ' during the innerHTML assignment, breaking out of the JavaScript string literal in the onclick attribute and executing the injected code.

Attack payload stored in database: x'+alert(1)+'

Resulting onclick after innerHTML decode:

return salesFormAction('add-product', 'x'+alert(1)+'')
//                                        ^^^^^^^^^^ executes before the funct…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-42877 has been found in facturascripts/facturascripts.
Attackers can target a specific entry point like referencia over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 5.4/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "facturascripts/facturascripts CVE-2026-42877" on the vendor's site.

CVE-2026-42877 (facturascripts/facturascripts) — CWE-79 / CVSS v3 5.4
Attack vector: remote (network-reachable)
Attack surface: referencia / onclick / innerHTML / test
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in facturascripts/facturascripts. Attackers reach the vulnerable code path via referencia.

📍 Affected scope

Check the vendor advisory for the affected versions of facturascripts/facturascripts. Attack surface: referencia / onclick / innerHTML / test.

🔥 Severity

Severity: Medium (CVSS 5.4/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to the patched release per vendor advisory.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'facturascripts/facturascripts' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'facturascripts/facturascripts' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で facturascripts/facturascripts を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

composer facturascripts/facturascripts
[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}]
Packagist facturascripts/facturascripts
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2025.92"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details