Categories
CVE-2026-61823 high CVSS 7.3

Cross-Site Scripting (XSS) in code16/sharp (CVE-2026-61823)

Summary

Cross-site scripting in code16/sharp (CVE-2026-61823). Confidential information can be exposed externally. Exploitable via srcdoc. Mitigation: upgrade to 9.22.5 or later.

Original description

The description as published by the source.

Impact

A Stored Cross-Site Scripting (XSS) vulnerability exists in the rich text editor due to improper sanitization of the srcdoc attribute on elements.

While the underlying Symfony HtmlSanitizer correctly HTML-encodes special characters inside the attribute value (e.g., converting to <script>), 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.

An attacker with permissions to edit an Editor field can inject malicious scripts to target other users viewing the content. Potential impacts include:

  • Session Hijacking (stealing admin session cookies via document.cookie)
  • Account Takeover & Privilege Escalation (e.g., a low-privileged editor triggering actions as an Administrator)
  • Admin panel data theft

Patches

The vulnerability has been patched in version v9.22.5.

The fix explicitly removes srcdoc from the list of allowed iframe attributes in src/Utils/Sanitization/FormatsSanitizedValue.php.

Workarounds

Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip srcdoc attributes.

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-61823 has been found in code16/sharp.
Attackers can target a specific entry point like srcdoc over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 7.3/10.
What to do: upgrade code16/sharp to 9.22.5 or later.
If unsure, ask your IT team or search "code16/sharp CVE-2026-61823" on the vendor's site.

CVE-2026-61823 (code16/sharp) — CWE-79 / CVSS v3 7.3
Attack vector: remote (network-reachable)
Attack surface: srcdoc
Patched: 9.22.5 — apply immediately
Workaround: Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip srcdoc attributes.
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 code16/sharp. Attackers reach the vulnerable code path via srcdoc.

📍 Affected scope

Check the vendor advisory for the affected versions of code16/sharp. Attack surface: srcdoc.

🔥 Severity

Severity: High (CVSS 7.3/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 9.22.5.

🛡️ Workaround

Workaround: Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip srcdoc attributes.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'code16/sharp' . 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 'code16/sharp' . | grep -v node_modules

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

  2. 2
    Apply temporary workaround mitigate
    Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip `srcdoc` attributes.

    パッチが適用されるまでの応急処置として、Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip srcdoc attributes. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade code16/sharp to 9.22.5

    ステージング環境で 9.22.5 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

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

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

Affected packages

composer code16/sharp
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.22.5"}]}]

References

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