Skip to content

Node 24.4.0 OOMs with pnpm #59057

Description

@cpojer

Version

24.4.0

Platform

Any, but primarily seems to happen on Linux.

Subsystem

No response

What steps will reproduce the bug?

See pnpm/pnpm#9743

It appears that something as simply as pnpm install --save @iconify/json using the latest pnpm and node are showing the issue.

Downgrading to Node 24.3 fixes the issue.

How often does it reproduce? Is there a required condition?

All the time.

What is the expected behavior? Why is that the expected behavior?

Not to OOM.

What do you see instead?

OOMs.

Additional information

No response

Activity

  1. Renegade334 commented on Jul 14, 2025

    @Renegade334
    Member

    I'd noticed this as well. Bisects to #58121, likely related to the changes to Hash::OneShotDigest. The offending call is here.

    Without testing, I'm fairly certain that the culprit will end up being

    Utf8Value utf8(isolate, args[3]);

    This currently tries to create a Utf8Value from the source data, but before checking whether or not the data is a string, which leads to an attempt to stringify the entire binary. Previously, this initialisation only took place where the input was typechecked.

    cc: @nodejs/crypto

  2. typed-sigterm commented on Jul 18, 2025

    @typed-sigterm

    Windows here, also encountered this

  3. jasnell commented on Jul 18, 2025

    @jasnell
    Member

    @Aditi-1400 ... Fyi... I'll take a look this weekend but if you'd like to investigate too, please do :-)

  4. jasnell commented on Jul 18, 2025

    @jasnell
    Member

    @Renegade334 ... Excellent work narrowing this down.

  5. Aditi-1400 commented on Jul 18, 2025

    @Aditi-1400
    Contributor

    @jasnell #59067 seems to fix this :) Thanks @Renegade334!

  6. prabhu commented on Jul 24, 2025

    @prabhu

    Worth getting a CVE since it affects trivial uses of createHash?

  7. added a commit that references this issue on Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions