ubuntu-cve-2021-23566
Vulnerability from osv_ubuntu
Published
2022-01-14 20:15
Modified
2026-05-20 14:53
Summary
Details

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.


{
  "affected": [
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "libjs-mocha",
            "binary_version": "1.20.1-2"
          },
          {
            "binary_name": "mocha",
            "binary_version": "1.20.1-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:16.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@1.20.1-2?arch=source\u0026distro=xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "1.20.1-1",
        "1.20.1-2"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "libjs-mocha",
            "binary_version": "1.20.1-7"
          },
          {
            "binary_name": "mocha",
            "binary_version": "1.20.1-7"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:18.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@1.20.1-7?arch=source\u0026distro=bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "1.20.1-7"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "mocha",
            "binary_version": "7.0.1+ds1-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@7.0.1+ds1-2?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "4.1.0+ds3-5",
        "7.0.1+ds1-2"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "node-postcss",
            "binary_version": "6.0.23-3"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "node-postcss",
        "purl": "pkg:deb/ubuntu/node-postcss@6.0.23-3?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "6.0.23-1",
        "6.0.23-3"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "mocha",
            "binary_version": "9.2.1+ds1+~cs28.3.8-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@9.2.1+ds1+~cs28.3.8-1?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "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"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "node-postcss",
            "binary_version": "8.4.6+~cs7.3.21-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "node-postcss",
        "purl": "pkg:deb/ubuntu/node-postcss@8.4.6+~cs7.3.21-1?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.2.1+~cs5.3.23-8",
        "8.4.5+~cs7.1.51-2",
        "8.4.6+~cs7.3.21-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "mocha",
            "binary_version": "10.4.0+ds1+~cs33.1.8-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:24.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@10.4.0+ds1+~cs33.1.8-1?arch=source\u0026distro=noble"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "10.2.0+ds1+~cs29.5.1-1",
        "10.4.0+ds1+~cs33.1.8-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "node-postcss",
            "binary_version": "8.4.31+~cs8.0.26-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:24.04:LTS",
        "name": "node-postcss",
        "purl": "pkg:deb/ubuntu/node-postcss@8.4.31+~cs8.0.26-1?arch=source\u0026distro=noble"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.4.20+~cs8.0.23-1",
        "8.4.31+~cs8.0.26-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "mocha",
            "binary_version": "10.7.2+ds1+~cs33.1.11-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:25.10",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@10.7.2+ds1+~cs33.1.11-2?arch=source\u0026distro=questing"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "10.7.2+ds1+~cs33.1.11-2"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "node-postcss",
            "binary_version": "8.5.6+~cs9.3.28-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:25.10",
        "name": "node-postcss",
        "purl": "pkg:deb/ubuntu/node-postcss@8.5.6+~cs9.3.28-1?arch=source\u0026distro=questing"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.4.49+~cs9.2.32-1",
        "8.5.6+~cs9.3.28-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "mocha",
            "binary_version": "11.7.5+ds1+~cs36.3.14-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:26.04:LTS",
        "name": "node-mocha",
        "purl": "pkg:deb/ubuntu/node-mocha@11.7.5+ds1+~cs36.3.14-2?arch=source\u0026distro=resolute"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "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"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "node-postcss",
            "binary_version": "8.5.8+~cs9.3.30-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:26.04:LTS",
        "name": "node-postcss",
        "purl": "pkg:deb/ubuntu/node-postcss@8.5.8+~cs9.3.30-1?arch=source\u0026distro=resolute"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "8.5.6+~cs9.3.28-1",
        "8.5.8+~cs9.3.30-1"
      ]
    }
  ],
  "aliases": [],
  "details": "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.",
  "id": "UBUNTU-CVE-2021-23566",
  "modified": "2026-05-20T14:53:09Z",
  "published": "2022-01-14T20:15:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2021-23566"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/ai/nanoid/pull/328"
    },
    {
      "type": "REPORT",
      "url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550"
    },
    {
      "type": "REPORT",
      "url": "https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444"
    },
    {
      "type": "REPORT",
      "url": "https://snyk.io/vuln/SNYK-JS-NANOID-2332193"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2021-23566"
    }
  ],
  "related": [],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2021-23566"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…