{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "16.16.0"
              },
              {
                "last_affected": "16.16.0"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "4d5c665e222f299e8b3efc428d96256d678b21af"
            },
            {
              "last_affected": "4d5c665e222f299e8b3efc428d96256d678b21af"
            }
          ],
          "repo": "https://github.com/frappe/erpnext",
          "type": "GIT"
        }
      ],
      "versions": [
        "16.16.0"
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Fluid Attacks",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42840.json"
  },
  "details": "An authenticated user can persist arbitrary HTML/JavaScript in the email_id or mobile_no fields of a Customer record and trigger unescaped rendering in the Point of Sale (POS) interface for every operator who selects that customer.\nThis issue affects ERPNext: 16.16.0.",
  "id": "CVE-2026-42840",
  "modified": "2026-07-15T01:49:15.020728271Z",
  "published": "2026-06-03T17:35:04.126Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://fluidattacks.com/es/advisories/weeknd"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42840.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42840"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/frappe/erpnext"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "ERPNext 16.16.0 - Stored XSS in POS customer section via unescaped template literals"
}