|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project are documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +## [2.0.0] - 2026-09-18 |
| 11 | + |
| 12 | +Security modernization. Requires **Node.js 18+**. Vendors **msgpack-c c-7.0.2**. |
| 13 | +GitHub Actions tests Node 18/20/22 on Ubuntu, macOS, and Windows 2022. |
| 14 | + |
| 15 | +### Added |
| 16 | + |
| 17 | +- Fail-closed unpack limits: array/map length ≤ 1,000,000, str/bin/ext ≤ 32 MiB, |
| 18 | + nesting depth ≤ 512. The bomb `dd ff 00 00 00` throws instead of allocating. |
| 19 | +- Pack recursion cap of 512 (deep input throws instead of SIGSEGV). |
| 20 | +- `Stream` emits `error` on unpack throw and drops the offending buffer. |
| 21 | +- `worker_threads` support (`NAN_MODULE_WORKER_ENABLED`, thread-local sbuffer |
| 22 | + pool and `bytes_remaining`). |
| 23 | +- TypeScript types (`index.d.ts`). |
| 24 | +- `node:test` suite, c8 + gcov coverage gated at 95%. |
| 25 | +- `SECURITY.md` and `COVERAGE.md`. |
| 26 | + |
| 27 | +### Changed |
| 28 | + |
| 29 | +- `nan` is `^2.23.1` (installs 2.x current). |
| 30 | +- `binding.gyp` no longer pins `-std=c++11`. |
| 31 | +- node-gyp 10+ uses Python 3. |
| 32 | +- Dates pack as ISO-8601 strings (`toISOString()`) at every nesting level. |
| 33 | +- Objects with `toJSON()` use that return value at every nesting level. |
| 34 | +- Numeric own keys are packed instead of dropped. |
| 35 | +- Cycle marks use V8 private symbols so a user key named `_msgpack_stack` is |
| 36 | + kept. |
| 37 | +- Integral doubles outside uint64/int64 range (for example `1e30`) pack as |
| 38 | + float64. |
| 39 | +- Map keys are installed with `DefineOwnProperty` so a wire `__proto__` cannot |
| 40 | + replace the decoded object's prototype. |
| 41 | +- Property reads during pack go through `Nan::TryCatch` (throwing getters and |
| 42 | + Proxy traps raise a catchable error). |
| 43 | +- `Stream` snapshots `bytes_remaining` and consumes the frame **before** |
| 44 | + `emit('msg')`, so a listener that unpacks or throws cannot desync or replay. |
| 45 | +- `Stream` emits packed integer `0` and packed `null` as real messages. |
| 46 | + |
| 47 | +### Fixed |
| 48 | + |
| 49 | +- Top-level `Buffer` packs as MessagePack bin, not `Buffer.prototype.toJSON`'s |
| 50 | + `{type, data}` map (`#49`). |
| 51 | +- sbuffer leak on pack throw (`#25686`). |
| 52 | +- Python msgpack maps with bin8 payloads unpack (`#10`). |
| 53 | +- `Stream` no longer skips packed `0` (`#44`). |
| 54 | + |
| 55 | +### Security |
| 56 | + |
| 57 | +- Unpacker rejects oversized headers before the C decoder allocates. |
| 58 | +- Pack throw paths free or return pooled sbuffers on every exit. |
| 59 | +- msgpack-c c-7.0.2 includes unpacker buffer-expansion overflow checks. |
| 60 | + |
| 61 | +[Unreleased]: https://github.com/msgpack/msgpack-node/compare/e04c9b55f98d64512174d6e859b8294b729659a2...HEAD |
| 62 | +[2.0.0]: https://github.com/msgpack/msgpack-node/commit/e04c9b55f98d64512174d6e859b8294b729659a2 |
0 commit comments