Skip to content

upgrade @swc/cli to fix yauzl off-by-one error #3291

@kav-viasat

Description

@kav-viasat

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

yauzl (aka Yet Another Unzip Library) version 3.2.0 for Node.js contains an off-by-one error in the NTFS extended timestamp extra field parser within the getLastModDate() function. The while loop condition checks cursor < data.length + 4 instead of cursor + 4 <= data.length, allowing readUInt16LE() to read past the buffer boundary. A remote attacker can cause a denial of service (process crash via ERR_OUT_OF_RANGE exception) by sending a crafted zip file with a malformed NTFS extra field. This affects any Node.js application that processes zip file uploads and calls entry.getLastModDate() on parsed entries. Fixed in version 3.2.1.

This is fixed by upgrading @swc/cli to version 0.8.0

Minimum reproduction code

n/a

Steps to reproduce

No response

Expected behavior

to not receive depedabot errors for yauzl

Package version

11.0.16

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions