Arbitrary Code Injection Affecting prismjs package, versions *


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-PRISMJS-9055448
  • published3 Mar 2025
  • disclosed3 Mar 2025
  • creditjackfromeast

Introduced: 3 Mar 2025

NewCVE-2024-53382  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

There is no fixed version for prismjs.

Overview

prismjs is a lightweight, robust, elegant syntax highlighting library.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the document.currentScript lookup process. An attacker can manipulate the web page content and execute unintended actions by injecting HTML elements that overshadow legitimate DOM elements.

Note:

This is only exploitable if the application accepts untrusted input containing HTML but not direct JavaScript.

CVSS Scores

version 4.0
version 3.1