GHSA-5379-f5hf-w38v

Suggest an improvement
Source
https://github.com/advisories/GHSA-5379-f5hf-w38v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-5379-f5hf-w38v/GHSA-5379-f5hf-w38v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-5379-f5hf-w38v
Aliases
Downstream
Published
2026-01-16T15:49:35Z
Modified
2026-02-03T03:17:23Z
Severity
  • 9.2 (Critical) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N CVSS Calculator
Summary
Deno node:crypto doesn't finalize cipher
Details

Summary

The vulnerability allows an attacker to have infinite encryptions.

This can lead to naive attempts at brute forcing, as well as more refined attacks with the goal to learn the server secrets.

PoC

import crypto from "node:crypto";

const key = crypto.randomBytes(32);
const iv = crypto.randomBytes(16);
const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
cipher.final()

console.log(cipher);

Expected Output

Cipheriv {
  _decoder: null,
  _options: undefined,
  Symbol(kHandle): CipherBase {}
}

Actual Output

Cipheriv {
  _events: {
    close: undefined,
    error: undefined,
    prefinish: [Function: prefinish],
    finish: undefined,
    drain: undefined,
    data: undefined,
    end: undefined,
    readable: undefined
  },
  _readableState: ReadableState {
    highWaterMark: 65536,
    buffer: [],
    bufferIndex: 0,
    length: 0,
    pipes: [],
    awaitDrainWriters: null,
    [Symbol(kState)]: 1048844
  },
  _writableState: WritableState {
    highWaterMark: 65536,
    length: 0,
    corked: 0,
    onwrite: [Function: bound onwrite],
    writelen: 0,
    bufferedIndex: 0,
    pendingcb: 0,
    [Symbol(kState)]: 17580812,
    [Symbol(kBufferedValue)]: null
  },
  allowHalfOpen: true,
  _final: [Function: final],
  _maxListeners: undefined,
  _transform: [Function: transform],
  _eventsCount: 1,
  [Symbol(kCapture)]: false,
  [Symbol(kCallback)]: null
}

Mitigations

All users should upgrade to Deno v2.6.0 or newer.

Database specific
{
    "cwe_ids":  [
        "CWE-325"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-01-16T15:49:35Z",
    "nvd_published_at":  "2026-01-15T23:15:51Z",
    "severity":  "CRITICAL"
}
References

Affected packages

crates.io / deno

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.6.0

Database specific

last_known_affected_version_range
"<= 2.5.6"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-5379-f5hf-w38v/GHSA-5379-f5hf-w38v.json"