Categories
CVE-2020-15138

Cross-Site Scripting (XSS) in prismjs (CVE-2020-15138)

Summary

Cross-site scripting in prismjs (CVE-2020-15138). Confidential information can be exposed externally. Mitigation: upgrade to 1.21.0 or later.

Original description

The description as published by the source.

Impact

The easing preview of the Previewers plugin has an XSS vulnerability that allows attackers to execute arbitrary code in Safari and Internet Explorer.

This impacts all Safari and Internet Explorer users of Prism >=v1.1.0 that use the Previewers plugin (>=v1.10.0) or the Previewer: Easing plugin (v1.1.0 to v1.9.0).

Patches

This problem is patched in v1.21.0.

Workarounds

To workaround the issue without upgrading, disable the easing preview on all impacted code blocks. You need Prism v1.10.0 or newer to apply this workaround.

References

The vulnerability was introduced by this commit on Sep 29, 2015 and fixed by Masato Kinugawa (#2506).

For more information

If you have any questions or comments about this advisory, please open an issue.

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

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-2020-15138 has been found in prismjs.
Confidential information can be exposed externally.
What to do: upgrade prismjs to 1.21.0 or later.
If unsure, ask your IT team or search "prismjs CVE-2020-15138" on the vendor's site.

CVE-2020-15138 (prismjs) — CWE-79
Attack vector: remote (network-reachable) / unauthenticated
Patched: 1.21.0 — apply immediately
Workaround: To workaround the issue without upgrading, disable the easing preview on all impacted code blocks.
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 prismjs.

📍 Affected scope

Check the vendor advisory for the affected versions of prismjs.

🔥 Severity

Severity: ?. Confidential information can be exposed externally.

🔧 How to fix

Update to 1.21.0.

🛡️ Workaround

Workaround: To workaround the issue without upgrading, disable the easing preview on all impacted code blocks.

🔍 Detection

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

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

  2. 2
    Apply temporary workaround mitigate
    To workaround the issue without upgrading, [disable the easing preview](https://prismjs.com/plugins/previewers/#disabling-a-previewer) on all impacted code blocks.

    パッチが適用されるまでの応急処置として、To workaround the issue without upgrading, disable the easing preview on all impacted code blocks. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade prismjs to 1.21.0

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

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

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

Affected packages

npm prismjs
[{"type":"SEMVER","events":[{"introduced":"1.1.0"},{"fixed":"1.21.0"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

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