GHSA-4cv2-xc5f-px8h: Brotkrueml/codehighlight Denial of Service Vulnerability

MODERATE
CVSS 5.0
Published
Advisory Summary

GHSA-4cv2-xc5f-px8h is a MODERATE (CVSS 5.0) denial of service vulnerability (General Security Weakness) affecting Brotkrueml/codehighlight libraries in the Packagist ecosystem. The issue involves denial of service in extension "code highlight" (codehighlight). Remediation is available by upgrading affected packages to version 2.5.0.

GHSA-4cv2-xc5f-px8h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4cv2-xc5f-px8h
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification General Security Weakness
Affected Product Brotkrueml/codehighlight
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix GHSA-4cv2-xc5f-px8h

To remediate this vulnerability, upgrade all affected Brotkrueml/codehighlight dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

brotkrueml/codehighlight fixed: 2.5.0
Upgrade brotkrueml/codehighlight to 2.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for brotkrueml/codehighlight

How to Check if You Are Affected

To determine whether your application is affected by GHSA-4cv2-xc5f-px8h, inspect your project dependencies for Brotkrueml/codehighlight:

inspect dependencies for brotkrueml/codehighlight

Analyze the terminal output to locate any version of Brotkrueml/codehighlight in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Brotkrueml/codehighlight, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The codehighlight extension bundles a vulnerable version of the 3rd party JavaScript component “prism” which is known to be vulnerable against Regular expression Denial of Service (ReDoS).

GHSA-4cv2-xc5f-px8h Affected Brotkrueml/codehighlight Versions

1 component(s)
Fixed Versions:
2.5.0
Product / Package Ecosystem Affected Versions Fixed Version
brotkrueml/codehighlight
Packagist
< 2.5.0
2.5.0

References

Frequently Asked Questions

What is GHSA-4cv2-xc5f-px8h?
GHSA-4cv2-xc5f-px8h is a security vulnerability in Brotkrueml/codehighlight involving Denial of Service in extension "Code Highlight" (codehighlight) under General Security Weakness.
Which Brotkrueml/codehighlight versions are affected?
Affected versions include releases prior to 2.5.0 across affected packages: brotkrueml/codehighlight.
What version fixes GHSA-4cv2-xc5f-px8h?
Upgrading to 2.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is brotkrueml/codehighlight affected?
Yes, brotkrueml/codehighlight is affected in releases prior to 2.5.0. Upgrade your dependency to 2.5.0 or later.
What is the CVSS score of GHSA-4cv2-xc5f-px8h?
GHSA-4cv2-xc5f-px8h has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L.
What CWE is associated with GHSA-4cv2-xc5f-px8h?
GHSA-4cv2-xc5f-px8h is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-4cv2-xc5f-px8h?
Run the dependency tree command: 'inspect dependencies for brotkrueml/codehighlight'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4cv2-xc5f-px8h",
  "modified" : "2024-05-15T18:03:38Z",
  "published" : "2024-05-15T18:03:37Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in extension \"Code Highlight\" (codehighlight)",
  "details" : "The codehighlight extension bundles a vulnerable version of the 3rd party JavaScript component “prism” which is known to be vulnerable against Regular expression Denial of Service (ReDoS).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "brotkrueml/codehighlight"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/brotkrueml/codehighlight/commit/c2f05e5200f1562a3fba2de1f12ee9872f883e2c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/brotkrueml/codehighlight/2021-03-16-1.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/brotkrueml/codehighlight"
  }, {
    "type" : "WEB",
    "url" : "https://typo3.org/security/advisory/typo3-ext-sa-2021-002"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T18:03:37Z",
    "nvd_published_at" : null
  }
}