{"schema":"threatline.record/2","record":{"id":"CVE-2026-61823","aliases":["GHSA-qxg3-46rw-79j8"],"summary":"code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute","details":"### Impact\nA Stored Cross-Site Scripting (XSS) vulnerability exists in the rich text editor due to improper sanitization of the srcdoc attribute on <iframe> elements.\n\nWhile the underlying Symfony HtmlSanitizer correctly HTML-encodes special characters inside the attribute value (e.g., converting <script> to &lt;script&gt;), the HTML specification mandates that browsers automatically decode HTML entities inside attribute values before processing them. As a result, any encoded JavaScript inside a srcdoc attribute is evaluated and executed as live HTML/JS in the context of the iframe when the page is rendered.\n\nAn attacker with permissions to edit an Editor field can inject malicious scripts to target other users viewing the content. Potential impacts include:\n\n- Session Hijacking (stealing admin session cookies via document.cookie)\n- Account Takeover & Privilege Escalation (e.g., a low-privileged editor triggering actions as an Administrator)\n- Admin panel data theft\n\n### Patches\nThe vulnerability has been patched in version v9.22.5.\n\nThe fix explicitly removes srcdoc from the list of allowed iframe attributes in `src/Utils/Sanitization/FormatsSanitizedValue.php`.\n\n### Workarounds\nUsers who cannot upgrade immediately can manually sanitize all content of editor fields to strip `srcdoc` attributes.","categories":["Libraries & packages"],"product":"code16/sharp","vendor":"code16","ecosystem":"composer","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-qxg3-46rw-79j8","source_modified_at":"2026-09-25T15:02:55Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"composer","name":"code16/sharp"},"range":"< 9.22.5"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-61823","source_modified_at":"2026-09-28T14:27:48.299Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"sharp","vendor":"code16","versions":[{"version":"< 9.22.5","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-qxg3-46rw-79j8","source_modified_at":"2026-09-25T15:15:06.240626570Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"code16/sharp","ecosystem":"Packagist","purl":"pkg:composer/code16/sharp"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.22.5"}]}],"versions":["7.0.0-alpha.1","7.27.0","7.7.2","v4.0-BETA1","v4.0-BETA2","v4.0-BETA3","v4.0-BETA4","v4.0-BETA5","v4.0-BETA6","v4.0.0","v4.0.1","v4.0.10","v4.0.11","v4.0.12","v4.0.13","v4.0.14","v4.0.15","v4.0.16","v4.0.17","v4.0.18","v4.0.19","v4.0.2","v4.0.20","v4.0.21","v4.0.3","v4.0.4","v4.0.5","v4.0.6","v4.0.7","v4.0.8","v4.0.9","v4.1.0","v4.1.1","v4.1.10","v4.1.11","v4.1.12","v4.1.13","v4.1.14","v4.1.15","v4.1.16","v4.1.17","v4.1.18","v4.1.19","v4.1.2","v4.1.20","v4.1.21","v4.1.22","v4.1.23","v4.1.24","v4.1.25"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-qxg3-46rw-79j8","source_modified_at":"2026-09-25T15:02:55Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"composer","name":"code16/sharp"},"version":"9.22.5"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-qxg3-46rw-79j8","source_modified_at":"2026-09-25T15:15:06.240626570Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"code16/sharp","ecosystem":"Packagist","purl":"pkg:composer/code16/sharp"},"version":"9.22.5"}],"cvss":7.3,"severity":"High","kev":{"listed":false},"epss":{"probability":0.0021,"percentile":0.1073,"score_date":"2026-10-23"},"published_at":"2026-09-24T18:31:18.190Z","modified_at":"2026-09-28T14:27:48.299Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-qxg3-46rw-79j8","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-25T15:02:55Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-61823","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-28T14:27:48.299Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-qxg3-46rw-79j8","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-25T15:15:06.240626570Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-61823","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/code16/sharp/security/advisories/GHSA-qxg3-46rw-79j8","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61823","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/code16/sharp/commit/ec509a22c808a5bd9dfad6a0a85c92ce6f411e21","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-qxg3-46rw-79j8","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","assessed_at":"2026-09-28T14:27:39.971450Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-09-28T14:27:48.299Z","content_hash":"cb78a61cef847a6bff0fe5e06a49ef7781c0e3067f63107292139b9e0ab07e86"}}
