VDB
Sign up
HIGH7.5

GHSA-px8p-9vwx-vf98

fflate unzipSync can enter an infinite loop when parsing malformed ZIP64 archives

Quick fix

GHSA-px8p-9vwx-vf98 — fflate: upgrade to the fixed version with the command below.

npm install fflate@0.4.9

Details

fflate through 0.8.2 is vulnerable to denial of service via an infinite loop in unzipSync(). A crafted ZIP archive with a central directory entry declaring compressed_size=0xFFFFFFFF (ZIP64 sentinel) but missing the required ZIP64 extra field tag 0x0001 causes z64e() to loop indefinitely due to out-of-bounds reads returning undefined, which coerces to 0, keeping the loop condition permanently true.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/fflate
Introduced in: 0.4.5Fixed in: 0.4.9
Fixnpm install fflate@0.4.9
npm/fflate
Introduced in: 0.5.0Fixed in: 0.5.4
Fixnpm install fflate@0.5.4
npm/fflate
Introduced in: 0.6.0Fixed in: 0.6.11
Fixnpm install fflate@0.6.11
npm/fflate
Introduced in: 0.7.0Fixed in: 0.7.5
Fixnpm install fflate@0.7.5
npm/fflate
Introduced in: 0.8.0Fixed in: 0.8.3
Fixnpm install fflate@0.8.3

References