Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-22918

Node.js before 16.4.1, 14.17.2, 12.22.2 is vulnerable to an out-of-bounds read when uv__idna_toascii() is used to convert strings to ASCII. The pointer p is read and increased without checking whether it is beyond pe, with the latter holding a pointer to the end of the buffer. This can lead to information disclosures or crashes. This function can be triggered via uv_getaddrinfo().

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-22918
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 07:26 UTC · Revision 1

Source evidence

CVE-2021-22918

core-osv · Original source

Published 12 Jul 2021, 11:15 UTC

Node.js before 16.4.1, 14.17.2, 12.22.2 is vulnerable to an out-of-bounds read when uv__idna_toascii() is used to convert strings to ASCII. The pointer p is read and increased without checking whether it is beyond pe, with the latter holding a pointer to the end of the buffer. This can lead to information disclosures or crashes. This function can be triggered via uv_getaddrinfo().

osv:CVE-2021-22918
Complete source record
{
  "id": "c602d3a5252af951e550046be75609ed012aebec307e02c2be41a0f3e61f6fc6",
  "url": "https://osv.dev/vulnerability/CVE-2021-22918",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-22918",
    "summary": "Node.js before 16.4.1, 14.17.2, 12.22.2 is vulnerable to an out-of-bounds read when uv__idna_toascii() is used to convert strings to ASCII. The pointer p is read and increased without checking whether it is beyond pe, with the latter holding a pointer to the end of the buffer. This can lead to information disclosures or crashes. This function can be triggered via uv_getaddrinfo().",
    "evidence": "osv:CVE-2021-22918",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-22918",
      "aliases": [
        "BIT-node-2021-22918",
        "BIT-node-min-2021-22918",
        "CVE-2021-22918"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nodejs/node",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2f45ad8060e13d5ac912335096d21526f2f9602b"
                },
                {
                  "fixed": "4eb2de9a776873d0475db611a8e7cba716afdf6b"
                },
                {
                  "introduced": "73aa21658dfa6a22c06451d080152b32b1f98dbe"
                },
                {
                  "fixed": "8ef3b0fc59370c90d885a6d1bc516af0a63f9962"
                },
                {
                  "introduced": "7162e686b18d22b4385fa5c04274fb04dbd810c7"
                },
                {
                  "fixed": "4f0a4bf82e2100a5ababc2ab2032fa807dc338e9"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "12.0.0"
                      },
                      {
                        "fixed": "12.22.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "14.0.0"
                      },
                      {
                        "fixed": "14.17.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "16.0.0"
                      },
                      {
                        "fixed": "16.4.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v16.4.0",
            "v14.17.1",
            "v16.3.0",
            "v16.2.0",
            "v14.17.0",
            "v16.1.0",
            "v16.0.0",
            "v14.16.1",
            "v12.22.1",
            "v12.22.0",
            "v14.16.0",
            "v12.21.0",
            "v12.20.2",
            "v14.15.5",
            "v14.15.4",
            "v12.20.1",
            "v14.15.3",
            "v14.15.2",
            "v12.20.0",
            "v12.19.1",
            "v14.15.1",
            "v14.15.0",
            "v14.14.0",
            "v14.13.1",
            "v12.19.0",
            "v14.13.0",
            "v14.12.0",
            "v12.18.4",
            "v14.11.0",
            "v14.10.1",
            "v14.10.0",
            "v14.9.0",
            "v14.8.0",
            "v14.7.0",
            "v12.18.3",
            "v14.6.0",
            "v14.5.0",
            "v12.18.2",
            "v12.18.1",
            "v12.18.0",
            "v14.4.0",
            "v12.17.0",
            "v14.3.0",
            "v14.2.0",
            "v14.1.0",
            "v12.16.3",
            "v14.0.0",
            "v12.16.2",
            "v12.16.1",
            "v12.16.0",
            "v12.15.0",
            "v12.14.1",
            "v12.14.0",
            "v12.13.1",
            "v12.13.0",
            "v12.12.0",
            "v12.11.1",
            "v12.11.0",
            "v12.10.0",
            "v12.9.1",
            "v12.9.0",
            "v12.8.1",
            "v12.8.0",
            "v12.7.0",
            "v12.6.0",
            "v12.5.0",
            "v12.4.0",
            "v12.3.1",
            "v12.3.0",
            "v12.2.0",
            "v12.1.0",
            "v12.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-22918.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:53.394348696Z",
      "provider": "osv",
      "references": [
        "https://security.gentoo.org/glsa/202401-23",
        "https://security.netapp.com/advisory/ntap-20210805-0003/",
        "https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf",
        "https://nodejs.org/en/blog/vulnerability/july-2021-security-releases/",
        "https://hackerone.com/reports/1209681"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "siemens:sinec_infrastructure_network_services",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.0.1.1"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-22918",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 437912,
  "published_at": "2021-07-12T11:15:07.937+00:00"
}