{"id":"CVE-2021-23566","aliases":["DEBIAN-CVE-2021-23566","DLA-4003-1","DLA-4013-1","EUVD-2022-0677","GHSA-qrpm-p2h7-hrv2","UBUNTU-CVE-2021-23566"],"status":"published","title":"Information Exposure","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","severity":{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00473,"percentile":0.4137,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200","CWE-704"],"published":"2022-01-14T20:05:21Z","modified":"2026-10-23T18:03:12Z","fixes":[{"ecosystem":"npm","package":"nanoid","fixed_in":["3.1.31"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"node-mocha","fixed_in":["9.1.4+ds1+~cs28.2.8-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-mocha","fixed_in":["9.1.4+ds1+~cs28.2.8-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-mocha","fixed_in":["9.1.4+ds1+~cs28.2.8-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-postcss","fixed_in":["8.4.5+~cs7.1.51-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-postcss","fixed_in":["8.4.5+~cs7.1.51-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-postcss","fixed_in":["8.4.5+~cs7.1.51-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"nanoid","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.1.31"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.4+ds1+~cs28.2.8-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.4+ds1+~cs28.2.8-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.4+ds1+~cs28.2.8-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.4.5+~cs7.1.51-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.4.5+~cs7.1.51-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.4.5+~cs7.1.51-1"}]}]},{"source":"osv","ecosystem":"Debian:11","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.1+~cs5.3.23-8+deb11u1"}]}],"versions":["8.2.1+~cs5.3.23-8"],"bundled":3},{"source":"osv","ecosystem":"Debian:11","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.1+ds1+~cs29.4.27-3+deb11u1"}]}],"versions":["8.2.1+ds1+~cs29.4.27-3"],"bundled":2},{"source":"osv","ecosystem":"npm","package":"nanoid","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.1.31"}]}]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.1-1","1.20.1-2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.1-7"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.1.0+ds3-5","7.0.1+ds1-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.0.23-1","6.0.23-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.2.1+ds1+~cs29.4.27-3","9.1.3+ds1+~cs31.2.38-1","9.2.0+ds1+~cs28.3.8-1","9.2.1+ds1+~cs28.3.8-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.2.1+~cs5.3.23-8","8.4.5+~cs7.1.51-2","8.4.6+~cs7.3.21-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.2.0+ds1+~cs29.5.1-1","10.4.0+ds1+~cs33.1.8-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.4.20+~cs8.0.23-1","8.4.31+~cs8.0.26-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.7.2+ds1+~cs33.1.11-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.4.49+~cs9.2.32-1","8.5.6+~cs9.3.28-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["11.7.5+ds1+~cs36.3.14-2","11.7.7+ds1+~cs36.3.16-1","11.8.0+ds1+~cs36.4.12-1","11.8.0+ds1+~cs36.4.12-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.5.8+~cs9.3.30-1","8.5.15+~cs9.3.34-1","8.5.15+~cs9.3.38-1","8.5.15+~cs9.3.39-1build1","8.5.25+~cs10.2.23-1","8.5.26+~cs10.2.24-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-mocha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.7.2+ds1+~cs33.1.11-2","11.7.2+ds1+~cs36.3.14-2build1","11.7.5+ds1+~cs36.3.14-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.5.6+~cs9.3.28-1","8.5.8+~cs9.3.30-1"]}],"products":[{"vendor":"nanoid_project","product":"nanoid"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-NANOID-2332193","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","report"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","report"]},{"url":"https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","report"]},{"url":"https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://github.com/ai/nanoid/pull/328","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html","tags":["web"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23566","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-qrpm-p2h7-hrv2"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-23566","tags":["advisory"]},{"url":"https://github.com/ai/nanoid","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-23566","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-23566","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-23566","title":"Information Exposure","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:05:21.597Z","modified":"2025-11-03T21:44:38.677Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2022-0677","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:05:21Z","modified":"2025-11-03T21:44:38Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P","level":"medium"}],"updated_at":"2026-11-02T19:49:31.7352Z"}],"ghsa":[{"id":"GHSA-qrpm-p2h7-hrv2","title":"Exposure of Sensitive Information to an Unauthorized Actor in nanoid","description":"The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-21T23:57:06Z","modified":"2025-11-04T16:35:00Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-200","CWE-704"],"updated_at":"2026-11-02T14:39:05.278442Z"}],"nvd":[{"id":"CVE-2021-23566","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:15:10.093Z","modified":"2026-06-17T03:38:49.813Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:P/I:N/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-704"],"updated_at":"2026-11-02T14:07:03.821385Z"}],"osv":[{"id":"CVE-2021-23566","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:15:10.093Z","modified":"2026-10-20T10:54:32.903533284Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:18.778776Z"},{"id":"DEBIAN-CVE-2021-23566","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:15:10.093Z","modified":"2026-10-23T18:03:12.409920682Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:34.637046Z"},{"id":"GHSA-qrpm-p2h7-hrv2","title":"Exposure of Sensitive Information to an Unauthorized Actor in nanoid","description":"The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-21T23:57:06Z","modified":"2025-11-04T16:35:00Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-200","CWE-704"],"updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"UBUNTU-CVE-2021-23566","description":"The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.","status":"published","published":"2022-01-14T20:15:00Z","modified":"2026-10-17T12:57:11.79817898Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:26.779273Z"},{"id":"DLA-4003-1","title":"node-postcss - security update","status":"published","published":"2024-12-26T00:00:00Z","modified":"2026-03-09T01:22:23.677212Z","updated_at":"2026-11-02T15:46:12.203458Z"},{"id":"DLA-4013-1","title":"node-mocha - security update","status":"published","published":"2025-01-11T00:00:00Z","modified":"2026-03-09T01:21:06.70621Z","updated_at":"2026-11-02T15:46:12.203458Z"}]}}
