{"ecosystem":"npm","package":"color-convert","version":null,"bugs":[{"id":247,"ecosystem":"npm","package_name":"color-convert","affected_version":"3.1.1","fixed_version":"3.1.2","bug_id":"osv:GHSA-pxx3-g568-hxr4","title":"color-convert@3.1.1 contains malware after npm account takeover","description":"### Impact\nOn 8 September 2025, the npm publishing account for `color-convert` was taken over after a phishing attack. Version `3.1.1` was published, functionally identical to the previous patch version, but with a malware payload added attempting to redirect cryptocurrency transactions to the attacker's own addresses from within browser environments.\n\nLocal environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct `<script>` inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt.\n\nThe malware seemingly only targets cryptocurrency transactions and wallets such as MetaMask. See references below for more information on the payload.\n\n### Patches\nnpm removed the offending package from the registry over the course of the day on 8 September, preventing further downloads from npm proper.\n\nOn 13 September, the package owner published new patch versions to help cache-bust those using private registries who might still have the compromised version cached. This version is functionally identical to the previously known-good version, published as a patch version bump above the compromised version.\n\nUsers should update to the latest patch version, completely remove their `node_modules` directory, clean their package manager's global cache, and rebuild any browser bundles from scratch.\n\nThose operating private registries or registry mirrors should purge the offending versions from any caches.\n\n### References\n- https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised\n- https://socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack\n- https://www.ox.security/blog/npm-packages-compromised/\n\n### Point of Contact\nIn the event suspicious behavior is still observed for the package listed in this security advisory after performing all of the above cleaning operations (see _Patches_ above), please reach out via one of the following channels of communication:\n\n- Bluesky, package owner: https://bsky.app/profile/bad-at-computer.bsky.social\n- `debug` repository, tracking issue (applies to all packages affected in the breach): https://github.com/debug-js/debug/issues/1005","severity":"high","status":"fixed","source":"osv","source_url":"https://github.com/Qix-/color-convert/security/advisories/GHSA-pxx3-g568-hxr4","labels":["CVE-2025-59162","GHSA-ch7m-m9rf-8gvv","MAL-2025-46971"],"created_at":"2026-04-19T04:30:48.947135+00:00","updated_at":"2026-04-19T04:30:48.947135+00:00"},{"id":252,"ecosystem":"npm","package_name":"color-convert","affected_version":null,"fixed_version":null,"bug_id":"github:41","title":"backward conversion isn't accurate","description":"You can try in node REPL: `'A1C9FF' !== 'A1CAFF'`\r\n\r\n```\r\n> var conf = require('color-convert')\r\nundefined\r\n> conv.hex.hsv('A1C9FF')\r\n[ 214, 37, 100 ]\r\n> conv.hsv.hex([214,37,100])\r\n'A1CAFF'\r\n> conv.hsv.hex([214,37,100])\r\n```\r\n\r\n","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/Qix-/color-convert/issues/41","labels":["bug"],"created_at":"2026-04-19T04:30:49.766107+00:00","updated_at":"2026-04-19T04:30:49.766107+00:00"},{"id":251,"ecosystem":"npm","package_name":"color-convert","affected_version":null,"fixed_version":null,"bug_id":"github:73","title":"Hue component of HCG color is wrong by 120° then converting from RGB or CMYK","description":"Steps to reproduce\r\n===\r\n\r\nHere we are converting from RGB to HCG and then back.\r\nNote color components are very far apart.\r\n\r\n> var convert = require('color-convert')\r\n> convert.hcg.rgb.raw(convert.rgb.hcg.raw([250, 0, 255]))\r\n[ 0, 255, 249.99999999999991 ]\r\n\r\nDescription\r\n===\r\n\r\nThen converting color to HCG from RGB or CMYK Hue component of the color appears to be offset by 120°.\r\n\r\nCurrent behavior\r\n===\r\n\r\n> var convert = require('color-convert')\r\n> convert.rgb.hcg.raw([250, 0, 255])\r\n[ 178.8235294117647, 100, 0 ]\r\n\r\nExpected behavior\r\n===\r\n\r\n> var convert = require('color-convert')\r\n> convert.rgb.hcg.raw([250, 0, 255])\r\n[ 298.8235294117647, 100, 0 ]\r\n\r\nCause?\r\n===\r\n\r\nhttps://github.com/Qix-/color-convert/blob/master/conversions.js#L668\r\n\r\n4 is added twice. \r\nThis is most likely it, but I'm not 100% sure. ","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/Qix-/color-convert/issues/73","labels":["bug"],"created_at":"2026-04-19T04:30:49.765478+00:00","updated_at":"2026-04-19T04:30:49.765478+00:00"},{"id":250,"ecosystem":"npm","package_name":"color-convert","affected_version":"2.0.1","fixed_version":null,"bug_id":"github:74","title":"inaccurate ansi256 conversion","description":"Thanks for this awesome library!\r\n\r\nIt seems like converting `#282629` returns `59` (`#5f5f5f`).\r\n```javascript\r\nconsole.log(convert.hex.ansi256('#282629'));\r\n```\r\nHowever, I think `235` (`#262626`) is a better 256-color approximation of `#282629`.\r\n\r\nI'm using 2.0.1 of `color-convert`.","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/Qix-/color-convert/issues/74","labels":["bug"],"created_at":"2026-04-19T04:30:49.764851+00:00","updated_at":"2026-04-19T04:30:49.764851+00:00"},{"id":249,"ecosystem":"npm","package_name":"color-convert","affected_version":null,"fixed_version":null,"bug_id":"github:124","title":"error when convert.keyword.rgb. Cannot assign to read only property '0' of object '[object Array]' in wrappedFn","description":"Running the tests in this project also fail for me at \n`assert.deepStrictEqual(convert.keyword.rgb('blue'), [0, 0, 255]);`\n```\nfile:///Users/pmcw/Documents/development/color-convert/color-convert/index.js:49\n                                result[i] = Math.round(result[i]);\n                                          ^\n\nTypeError: Cannot assign to read only property '0' of object '[object Array]'\n    at Object.wrappedFn [as rgb] (file:///Users/pmcw/Documents/development/color-convert/color-convert/index.js:49:15)\n    at file:///Users/pmcw/Documents/development/color-convert/color-convert/test/basic.js:92:40\n    at ModuleJob.run (node:internal/modules/esm/module_job:343:25)\n    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)\n    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)\n```","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/Qix-/color-convert/issues/124","labels":["bug"],"created_at":"2026-04-19T04:30:49.763843+00:00","updated_at":"2026-04-19T04:30:49.763843+00:00"},{"id":248,"ecosystem":"npm","package_name":"color-convert","affected_version":null,"fixed_version":null,"bug_id":"osv:MAL-2025-46971","title":"Malicious code in color-convert (npm)","description":"The package was compromised and malicious code added.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: ghsa-malware (71ee3370ed9cf22bf89fbf40c954408a6ddcd17fbd38750027a2b7fab6034bce)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","severity":"medium","status":"open","source":"osv","source_url":"https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised","labels":["CVE-2025-59162","GHSA-ch7m-m9rf-8gvv","GHSA-pxx3-g568-hxr4"],"created_at":"2026-04-19T04:30:48.948240+00:00","updated_at":"2026-04-19T04:30:48.948240+00:00"}],"total":6,"_cache":"miss"}