GHSA-65p8-3hm4-h9h8: Rgb2hex Denial of Service Vulnerability

MODERATE
CVSS 6.5
CWE-400
Published
Advisory Summary

GHSA-65p8-3hm4-h9h8 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Rgb2hex libraries in the npm ecosystem. The issue involves denial of service in rgb2hex. Remediation is available by upgrading affected packages to version 0.1.6.

GHSA-65p8-3hm4-h9h8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-65p8-3hm4-h9h8
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Rgb2hex
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:U/C:N/I:N/A:H).

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

How to Fix GHSA-65p8-3hm4-h9h8

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

rgb2hex fixed: 0.1.6
npm install rgb2hex@0.1.6
Verify Direct and Transitive Dependencies

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

npm ls rgb2hex

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-65p8-3hm4-h9h8, inspect your project dependencies using npm:

npm ls rgb2hex

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

Note: The npm ls rgb2hex command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Rgb2hex, 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

All versions of `rgb2hex` are vulnerable to Regular Expression Denial of Service (ReDoS) when an attacker can pass in a specially crafted invalid color value. ## Recommendation Update to version 0.1.6 or later.

GHSA-65p8-3hm4-h9h8 Affected Rgb2hex Versions

1 component(s)
Fixed Versions:
0.1.6
Product / Package Ecosystem Affected Versions Fixed Version
rgb2hex
npm
< 0.1.6
0.1.6

References

Frequently Asked Questions

What is GHSA-65p8-3hm4-h9h8?
GHSA-65p8-3hm4-h9h8 is a security vulnerability in Rgb2hex involving Denial of Service in rgb2hex under CWE-400: Uncontrolled Resource Consumption.
Which Rgb2hex versions are affected?
Affected versions include releases prior to 0.1.6 across affected packages: rgb2hex.
What version fixes GHSA-65p8-3hm4-h9h8?
Upgrading to 0.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rgb2hex affected?
Yes, rgb2hex is affected in releases prior to 0.1.6. Upgrade your dependency to 0.1.6 or later.
What is the CVSS score of GHSA-65p8-3hm4-h9h8?
GHSA-65p8-3hm4-h9h8 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-65p8-3hm4-h9h8?
GHSA-65p8-3hm4-h9h8 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-65p8-3hm4-h9h8?
Run the dependency tree command: 'npm ls rgb2hex'. 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-65p8-3hm4-h9h8",
  "modified" : "2021-08-17T21:23:49Z",
  "published" : "2019-08-23T00:04:48Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in rgb2hex",
  "details" : "All versions of `rgb2hex` are vulnerable to Regular Expression Denial of Service (ReDoS) when an attacker can pass in a specially crafted invalid color value.\n\n\n## Recommendation\n\nUpdate to version 0.1.6 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "rgb2hex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/319629"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/christian-bromann/rgb2hex/blob/v0.1.0/index.js#L25"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/npm:rgb2hex:20180429"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/647"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-08-22T14:26:35Z",
    "nvd_published_at" : null
  }
}