{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2b4ec5b03bf2f48a74c0eb45dcaa3f208025c919"
            }
          ],
          "repo": "https://github.com/streetwriters/notesnook",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-jprx-2w2h-4rh5"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31876.json"
  },
  "details": "Notesnook is a note-taking app focused on user privacy \u0026 ease of use. Prior to 3.3.9, a Stored Cross-Site Scripting (XSS) vulnerability existed in Notesnook's editor embed component when rendering Twitter/X embed URLs. The tweetToEmbed() function in component.tsx interpolated the user-supplied URL directly into an HTML string without escaping, which was then assigned to the srcdoc attribute of an \u003ciframe\u003e. This vulnerability is fixed in 3.3.9.",
  "id": "CVE-2026-31876",
  "modified": "2026-04-01T23:08:53.149010641Z",
  "published": "2026-03-11T18:17:08.142Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31876.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/streetwriters/notesnook/security/advisories/GHSA-jprx-2w2h-4rh5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31876"
    },
    {
      "type": "FIX",
      "url": "https://github.com/streetwriters/notesnook/commit/e87f5e5f899f45df28d7c0f33f15e9178d1fbcb7"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Notesnook has Stored XSS via unsanitized Twitter/X embed URL in editor (`tweetToEmbed`)"
}