# GHSA-65p8-3hm4-h9h8: Denial of Service in rgb2hex

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-08-23T00:04:48.000Z
- Modified: 2021-08-17T21:23:49.000Z
- Weaknesses: CWE-400

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- rgb2hex (npm): before 0.1.6

## References

- <https://hackerone.com/reports/319629> (web)
- <https://github.com/christian-bromann/rgb2hex/blob/v0.1.0/index.js#L25> (web)
- <https://snyk.io/vuln/npm:rgb2hex:20180429> (web)
- <https://www.npmjs.com/advisories/647> (web)

## Sources

- GitHub Advisory Database: [GHSA-65p8-3hm4-h9h8](https://github.com/advisories/GHSA-65p8-3hm4-h9h8), CC-BY-4.0, modified 2021-08-17

---

Page: https://cve.day/GHSA-65p8-3hm4-h9h8 · Whole record: https://cve.day/GHSA-65p8-3hm4-h9h8.json · Rebuilt by cve.day 2026-11-25T22:56:44.302Z
