Vulnerability Found in Highlight.js Library

TL;DR: A prototype pollution vulnerability has been discovered in Highlight.js, a widely-used syntax highlighting library. The flaw could allow an attacker to cause a denial of service or trigger unexpected application behavior. It affects web applications that use the library for displaying code snippets.
Key facts
- Category
- Cybersecurity
- Impact
- Medium
- Published
- Source
- Ubuntu Security Notices
Full summary
A prototype pollution vulnerability in the popular Highlight.js library could allow attackers to cause denial of service or unexpected application behavior.
A security vulnerability has been identified in Highlight.js, a popular JavaScript library used for syntax highlighting on websites and in applications. The issue, detailed in an Ubuntu Security Notice, is a prototype pollution vulnerability. It stems from the library's use of plain JavaScript objects for internal language name lookups. This implementation detail created an opening for attackers to manipulate object prototypes, which are fundamental to how JavaScript objects inherit properties and methods. By exploiting this, a malicious actor could alter the behavior of objects throughout an application that uses the library.
The primary impact of this vulnerability is the potential for a denial-of-service (DoS) attack, where an attacker could crash an application or make it unresponsive. It could also lead to other unexpected application behaviors, depending on how the prototype is manipulated. While this flaw does not lead to more severe outcomes like remote code execution or direct data exposure, it still poses a risk to the stability and reliability of services. Developers, IT teams, and security professionals who maintain web applications incorporating Highlight.js are directly affected and should be aware of this issue.
⚡ Action needed
Developers using Highlight.js should update to a patched version to mitigate the vulnerability. Check your project's dependencies and apply the necessary security updates provided by your package manager or the official Highlight.js repository.
Action checklist
- 1Identify all projects using the Highlight.js library.
- 2Check the currently installed version for vulnerability.
- 3Update to the latest patched version of Highlight.js.
- 4Test your application to ensure functionality is not broken.
- 5Monitor for any unusual application behavior post-update.
Related on Notifire
Related stories
Primary source: Ubuntu Security Notices