Skip to content
Heist/ feed
Back to feed
MediumFix available

pbkdf2 rehashes long passwords on every iteration, enabling denial of service

Type: advisorySources: OSV

### Summary This is the same bug as Django had (CVE-2013-1443). ### Details A long password can cause a DoS because it is not using cached HMAC, length limits, or pre-hashing passwords longer than the block size of the hash function as per HMAC spec. This line of code hashes the full password each iteration: https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/lib/sync.js#L60 Also see https://github.com/browserify/pbkdf2/issues/82 ### PoC The first key will take a lot longer to generate when not using the native code and uses code from `/lib/sync.js` (ie when this if statement is true): https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/index.js#L33-L37 ```js var pbkdf2 = require('pbkdf2'); var createHash = require('create-hash'); var pw = ".".repeat(1048576); // 1 MiB var t0 = performance.now(); var key1 = pbkdf2.pbkdf2Sync(pw, "salt", 1000, 32, "sha256"); var t1 = performance.now(); pw = createHash('sha256').update(pw).digest(); // HMAC specification for keys larger than block size var key2 = pbkdf2.pbkdf2Sync(pw, "salt", 1000, 32, "sha256"); var t2 = performance.now(); console.log("First took: " + (t1 - t0)); console.log("Second took: " + (t2 - t1)); console.log("Generated keys:"); console.log(key1); console.log(key2); ``` ### Impact DoS

Products
pbkdf2
Affected versions
Not specified
Fixed versions
3.1.7
CVEs
CVE-2026-102414
Confirmed fixed CVEs
Not specified
Updated in this feed
27 Oct 2026, 11:18 UTC · Revision 1

Source evidence

pbkdf2 rehashes long passwords on every iteration, enabling denial of service

core-osv · Original source

Published 6 Oct 2026, 13:40 UTC

### Summary This is the same bug as Django had (CVE-2013-1443). ### Details A long password can cause a DoS because it is not using cached HMAC, length limits, or pre-hashing passwords longer than the block size of the hash function as per HMAC spec. This line of code hashes the full password each iteration: https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/lib/sync.js#L60 Also see https://github.com/browserify/pbkdf2/issues/82 ### PoC The first key will take a lot longer to generate when not using the native code and uses code from `/lib/sync.js` (ie when this if statement is true): https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/index.js#L33-L37 ```js var pbkdf2 = require('pbkdf2'); var createHash = require('create-hash'); var pw = ".".repeat(1048576); // 1 MiB var t0 = performance.now(); var key1 = pbkdf2.pbkdf2Sync(pw, "salt", 1000, 32, "sha256"); var t1 = performance.now(); pw = createHash('sha256').update(pw).digest(); // HMAC specification for keys larger than block size var key2 = pbkdf2.pbkdf2Sync(pw, "salt", 1000, 32, "sha256"); var t2 = performance.now(); console.log("First took: " + (t1 - t0)); console.log("Second took: " + (t2 - t1)); console.log("Generated keys:"); console.log(key1); console.log(key2); ``` ### Impact DoS

osv:GHSA-477h-4r7f-fvrx

pbkdf2

Fixed versions: 3.1.7

Complete source record
{
  "id": "4f03eef8516fb6e32e870de632f3b6ae39847b35585063ddd5b51ea59e0bce05",
  "url": "https://osv.dev/vulnerability/GHSA-477h-4r7f-fvrx",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "pbkdf2 rehashes long passwords on every iteration, enabling denial of service",
    "summary": "### Summary This is the same bug as Django had (CVE-2013-1443). ### Details A long password can cause a DoS because it is not using cached HMAC, length limits, or pre-hashing passwords longer than the block size of the hash function as per HMAC spec. This line of code hashes the full password each iteration: https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/lib/sync.js#L60 Also see https://github.com/browserify/pbkdf2/issues/82 ### PoC The first key will take a lot longer to generate when not using the native code and uses code from `/lib/sync.js` (ie when this if statement is true): https://github.com/browserify/pbkdf2/blob/1c3b1f526b052a29b3b42120c9821895772df7e8/index.js#L33-L37 ```js var pbkdf2 = require('pbkdf2'); var createHash = require('create-hash'); var pw = \".\".repeat(1048576); // 1 MiB var t0 = performance.now(); var key1 = pbkdf2.pbkdf2Sync(pw, \"salt\", 1000, 32, \"sha256\"); var t1 = performance.now(); pw = createHash('sha256').update(pw).digest(); // HMAC specification for keys larger than block size var key2 = pbkdf2.pbkdf2Sync(pw, \"salt\", 1000, 32, \"sha256\"); var t2 = performance.now(); console.log(\"First took: \" + (t1 - t0)); console.log(\"Second took: \" + (t2 - t1)); console.log(\"Generated keys:\"); console.log(key1); console.log(key2); ``` ### Impact DoS",
    "evidence": "osv:GHSA-477h-4r7f-fvrx",
    "products": [
      {
        "name": {
          "value": "pbkdf2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.1.7",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-477h-4r7f-fvrx",
      "aliases": [
        "CVE-2026-102414",
        "GHSA-477h-4r7f-fvrx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
        },
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.1.7"
                }
              ]
            }
          ],
          "package": {
            "name": "pbkdf2",
            "purl": "pkg:npm/pbkdf2",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-477h-4r7f-fvrx/GHSA-477h-4r7f-fvrx.json",
            "last_known_affected_version_range": "<= 3.1.6"
          }
        }
      ],
      "modified": "2026-10-06T13:45:05.863430802Z",
      "provider": "osv",
      "references": [
        "https://github.com/browserify/pbkdf2/security/advisories/GHSA-477h-4r7f-fvrx",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-102414",
        "https://github.com/browserify/pbkdf2/issues/82",
        "https://github.com/browserify/pbkdf2/commit/493d8d8ff437f680338bf7397398fda884ad462e",
        "https://github.com/browserify/pbkdf2"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-400"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": "2026-09-29T04:17:55Z",
        "github_reviewed_at": "2026-10-06T13:40:10Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-102414",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 89083,
  "published_at": "2026-10-06T13:40:10+00:00"
}