CVE-2026-42840: ERPNext 16.16.0 - Stored XSS in POS customer section via unescaped template literals

Published Jun 3, 2026
·
Updated

An authenticated user can persist arbitrary HTML/JavaScript in the emailid or mobileno fields of a Customer record and trigger unescaped rendering in the Point of Sale (POS) interface for every operator who selects that customer. This issue affects ERPNext: 16.16.0.

Affected Software

1 affected component
Frappe ERPNext=16.16.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Sanitize and/or escape HTML and JavaScript in the Customer.email_id and Customer.mobile_no fields on input and ensure values are properly escaped before rendering in the Point of Sale (POS) interface to prevent stored XSS.

    ERPNext (Customer / POS rendering) email_id and mobile_no input/output handling = escape or strip HTML/JavaScript
  2. Compensating control

    Restrict which authenticated users/roles can create or update Customer records (or specifically the email_id and mobile_no fields) to a minimal set of trusted administrators to reduce ability for untrusted users to persist malicious content.

  3. Compensating control

    Limit access to the POS interface to trusted operator networks and consider deploying web-application protections (CSP, WAF rules, or reverse-proxy filtering) to block or mitigate inline scripts and known malicious payloads until a code fix is available.

  4. Operational

    Search existing Customer records for malicious or unexpected HTML/JavaScript in the email_id and mobile_no fields and remove or sanitize any found entries in the database and POS caches.

Event History

Jun 3, 2026
CVE Published
via MITRE·05:35 PM
Data Sourced
via MITRE·05:35 PM
DescriptionWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42840?

CVE-2026-42840 has a risk rating of 40.

2

How do I fix CVE-2026-42840?

To fix CVE-2026-42840, ensure proper input validation and escaping for the email_id and mobile_no fields in the Customer record.

3

Who is affected by CVE-2026-42840?

CVE-2026-42840 affects users of ERPNext version 16.16.0 who interact with the POS customer section.

4

What type of vulnerability is CVE-2026-42840?

CVE-2026-42840 is a Stored Cross-Site Scripting (XSS) vulnerability.

5

What impact does CVE-2026-42840 have on users?

CVE-2026-42840 allows an authenticated user to persist malicious code that executes in the POS interface for all operators who select the affected customer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203