npm / devalue
devalue
What changed in devalue 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
3 breaking17 security6 performance2 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdevalue 612 changes
Breaking changes 2
Uneval replacers now use the tagged template js instead of nested uneval.
Node 22.17 or newer is required.
Performance 4
Uses native JSON.stringify for strings that need escaping instead of a per-character loop.
Formats paths only when an error is raised.
Caches quoted property names.
Skips per-character escaping for strings with nothing to escape.
Behavior and default changes 2
Lowers the required Node.js version to >=18.
Cyclic custom objects are now supported.
Fixes and other changes 4
Populates error.path for values reached through a promise.
Malformed payloads throw
Invalid inputinstead of a rawTypeError.Handles typed array views whose backing buffer ends with a partial element.
Uneval and stringify output now escapes unpaired surrogates so it survives UTF-8 transport.
devalue 520 changes
Breaking changes 1
Non-enumerable symbolic keys are ignored.
Security 17
Serializes only visible Node Buffer bytes in
stringify,stringifyAsync, anduneval, preventing disclosure of unrelated data from the shared allocation pool.devalue: Custom ArrayBuffer revivers can bypass typed-array allocation validation
devalue: Malformed null-prototype object keys bypass __proto__ rejection via property-key coercion
devalue: Repeated primitive strings cause quadratic expansion in uneval
devalue: Residual sparse-array CPU amplification in uneval
devalue: Sparse arrays emitted by uneval cause eager allocation when evaluated
devalue:
stringify/unevalserialize shared memorydevalue: stringifyAsync can cause an unhandled rejection despite a caught returned promise
Rejects non-string keys on null-prototype objects, preventing a bypass of the
__proto__check.Svelte devalue: DoS via malformed input
Svelte devalue: DoS via sparse array deserialization
devalue has prototype pollution in devalue.parse and devalue.unflatten
Sveltejs devalue's
devalue.parseanddevalue.unflattenemit objects with__proto__own propertiesdevalue affected by CPU and memory amplification from sparse arrays
devalue
unevaled code can create objects with polluted prototypes whenevaledDevalue is vulnerable to denial of service due to memory exhaustion in devalue.parse
devalue vulnerable to denial of service due to memory/CPU exhaustion in devalue.parse
Performance 2
Module-level Object.freeze calls are annotated as pure so unused operation tables can be tree-shaken.
Prevents quadratic output expansion for repeated strings and bigints.