Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

msgpack5

Latest version: v6.1.0

Overview

Last scanned
26 Sep 2026
Published
26 Sep 2026
npm package Publisher: matteo.collina
499 Stars
77 Forks
1 Versions
612.4K Downloads
JavaScript Repo language

Scan summary

msgpack5 was last scanned on 26 Sep 2026 at version 6.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 26 Sep 2026.
  • Findings: No rules fired in version 6.1.0.
  • Downloads: 612,449 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
6.1.0 LATEST 26 Sep 2026 No rules fired

No rules fired in 6.1.0

Findings

Findings for v6.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 6.1.0; other versions have their own rules, not their own score.

Known vulnerabilities

8 CVEs · last 8 Oct 2026

0 CRITICAL 3 HIGH 4 MEDIUM 1 LOW

Versions

  • ≥ 6.1.0
  • ≥ 5.2.1, < 6.1.0 2 HIGH 4 MEDIUM 1 LOW
  • ≥ 5.0.0, < 5.2.1 3 HIGH 4 MEDIUM 1 LOW
  • ≥ 4.5.1, < 5.0.0 2 HIGH 4 MEDIUM 1 LOW
  • ≥ 4.1.0, < 4.5.1 3 HIGH 4 MEDIUM 1 LOW
  • ≥ 4.0.0, < 4.1.0 2 HIGH 4 MEDIUM 1 LOW
  • ≥ 3.6.1, < 4.0.0 1 HIGH 4 MEDIUM 1 LOW
  • < 3.6.1 2 HIGH 4 MEDIUM 1 LOW

Vulnerabilities

  • CVE-2026-107302 High 8 Oct 2026 msgpack5: Truncated map32 headers throw an unexpected error Fixed in 6.1.0
  • CVE-2026-107301 Medium 8 Oct 2026 msgpack5: Partial options disable prototype protection Fixed in 6.1.0
  • CVE-2026-107300 High 8 Oct 2026 msgpack5: Many buffered values can exhaust the streaming decoder stack Fixed in 6.1.0
  • CVE-2026-107299 Medium 8 Oct 2026 msgpack5: Reserved byte can cause unbounded stream buffering Fixed in 6.1.0
  • CVE-2026-107298 Medium 8 Oct 2026 msgpack5: Deeply nested input can exhaust the decoder stack Fixed in 6.1.0
  • CVE-2026-107297 Medium 8 Oct 2026 msgpack5: Quadratic parsing in the streaming decoder Fixed in 6.1.0
  • CVE-2026-107296 Low 8 Oct 2026 msgpack5: Decoding negative int64 values mutates the input buffer Fixed in 6.1.0
  • CVE-2021-21368 High 12 Mar 2021 Prototype poisoning Fixed in 3.6.1, 4.5.1, 5.2.1

README

The publisher’s own README, as collected from the registry.

msgpack5  CI

A msgpack v5 implementation for node.js and the browser, with extension point support.

Install

npm install msgpack5 --save

Usage

var msgpack = require('msgpack5')() // namespace our extensions
  , a       = new MyType(2, 'a')
  , encode  = msgpack.encode
  , decode  = msgpack.decode

msgpack.register(0x42, MyType, mytipeEncode, mytipeDecode)

const hex = encode({ 'hello': 'world' }).toString('hex')
console.log(hex)
// 81a568656c6c6fa5776f726c64
const obj = decode(Buffer.from(hex, 'hex'))
console.log(obj)
// { hello: 'world' }

console.log(decode(encode({ 'hello': 'world' })))
// { hello: 'world' }
console.log(encode(a).toString('hex'))
// d5426161
console.log(decode(encode(a)) instanceof MyType)
// true
console.log(decode(encode(a)))
// { value: 'a', size: 2 }

function MyType(size, value) {
  this.value = value
  this.size  = size
}

function mytipeEncode(obj) {
  var buf = new Buffer(obj.size)
  buf.fill(obj.value)
  return buf
}

function mytipeDecode(data) {
  var result = new MyType(data.length, data.toString('utf8', 0, 1))
    , i

  for (i = 0; i < data.length; i++) {
    if (data.readUInt8(0) != data.readUInt8(i)) {
      throw new Error('should all be the same')
    }
  }

  return result
}

In the Browser

This library is compatible with Browserify.

If you want to use standalone, grab the file in the dist folder of this repo, and use in your own HTML page, the module will expose a msgpack5 global.

<script type="text/javascript"
        src="./msgpack5.min.js">
</script>
To build
    npm run build

API

API

  • msgpack()
  • msgpack().encode()
  • msgpack().decode()
  • msgpack().registerEncoder()
  • msgpack().registerDecoder()
  • msgpack().register()
  • msgpack().encoder()
  • msgpack().decoder()

msgpack(options(obj))

Creates a new instance on which you can register new types for being encoded.

options:

  • forceFloat64, a boolean to that forces all floats to be encoded as 64-bits floats. Defaults to false.
  • sortKeys, a boolean to force a determinate keys order
  • compatibilityMode, a boolean that enables "compatibility mode" which doesn't use bin format family and str 8 format. Defaults to false.
  • disableTimestampEncoding, a boolean that when set disables the encoding of Dates into the timestamp extension type. Defaults to false.
  • preferMap, a boolean that forces all maps to be decoded to Maps rather than plain objects. This ensures that decode(encode(new Map())) instanceof Map and that iteration order is preserved. Defaults to false.
  • maxArrayLength, a non-negative integer that limits the number of elements in a decoded array. Arrays over the limit throw a RangeError. Defaults to no limit beyond the MessagePack format maximum.
  • maxMapLength, a non-negative integer that limits the number of entries in a decoded map. Maps over the limit throw a RangeError. Defaults to no limit beyond the MessagePack format maximum.
  • maxDepth, a non-negative integer that limits how deeply arrays and maps can be nested when decoding. Defaults to 100.
  • protoAction, a string which can be error|ignore|remove that determines what happens when decoding a plain object with a __proto__ property which would cause prototype poisoning. error (the default when omitted) throws an error, remove removes the property, ignore (not recommended) allows the property, thereby causing prototype poisoning on the decoded object. Any other value throws a TypeError.

encode(object)

Encodes object in msgpack, returns a bl.


decode(buf)

Decodes buf from in msgpack. buf can be a Buffer or a bl instance.

In order to support a stream interface, a user must pass in a bl instance.


registerEncoder(check(obj), encode(obj))

Register a new custom object type for being automatically encoded. The arguments are:

  • check, a function that will be called to check if the passed object should be encoded with the encode function
  • encode, a function that will be called to encode an object in binary form; this function must return a Buffer which include the same type for registerDecoder.

registerDecoder(type, decode(buf))

Register a new custom object type for being automatically decoded. The arguments are:

  • type, is a greater than zero integer identificating the type once serialized
  • decode, a function that will be called to decode the object from the passed Buffer

register(type, constructor, encode(obj), decode(buf))

Register a new custom object type for being automatically encoded and decoded. The arguments are:

  • type, is a greater than zero integer identificating the type once serialized
  • constructor, the function that will be used to match the objects with instanceof
  • encode, a function that will be called to encode an object in binary form; this function must return a Buffer that can be deserialized by the decode function
  • decode, a function that will be called to decode the object from the passed Buffer

This is just a commodity that calls registerEncoder and registerDecoder internally.


encoder(options)

Builds a stream in object mode that encodes msgpack.

Supported options:

  • wrap, objects should be passed to encoder in wrapped object {value: data}. Wrap option should be used if you need to pass null to encoder.

decoder(options)

Builds a stream in object mode that decodes msgpack.

Supported options:

  • wrap, decoded objects returned in wrapped object {value: data}. Wrap option should be used if stream contains msgpack nil.

LevelUp Support

msgpack5 can be used as a LevelUp valueEncoding straight away:

var level = require('level')
  , pack  = msgpack()
  , db    = level('foo', {
      valueEncoding: pack
    })
  , obj   = { my: 'obj' }

db.put('hello', obj, function(err) {
  db.get('hello', function(err, result) {
    console.log(result)
    db.close()
  })
})

Related projects

Disclaimer

This library is built fully on JS and on bl to simplify the code. Every improvement that keeps the same API is welcome.

Acknowledgements

This project was kindly sponsored by nearForm.

This library was originally built as the data format for JSChan.

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm msgpack5

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229