VDB
Sign up
HIGH7.5

GHSA-vw5p-8cq8-m7mv

Devalue is vulnerable to denial of service due to memory exhaustion in devalue.parse

Quick fix

GHSA-vw5p-8cq8-m7mv — devalue: upgrade to the fixed version with the command below.

npm install devalue@5.6.2

Details

## Summary

Certain inputs can cause `devalue.parse` to consume excessive CPU time and/or memory, potentially leading to denial of service in systems that parse input from untrusted sources. This affects applications using `devalue.parse` on externally-supplied data. The root cause is the typed array hydration expecting an `ArrayBuffer` as input, but not checking the assumption before creating the typed array.

## Details

The parser's typed array hydration logic does not properly validate input before processing. Specially crafted inputs can cause disproportionate memory allocation or CPU usage on the receiving system.

## Impact

This is a denial of service vulnerability affecting systems that use `devalue.parse` to handle data from potentially untrusted sources.

Affected systems should upgrade to patched versions immediately.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/devalue
Introduced in: 5.3.0Fixed in: 5.6.2
Fixnpm install devalue@5.6.2

References