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

@fastify/accepts-serializer

Latest version: v6.0.6

Overview

Last scanned
9 Oct 2026
Published
9 Oct 2026
npm package Publisher: eomm, matteo.collina
29 Stars
14 Forks
2 Versions
17.6K Downloads
JavaScript Repo language

Scan summary

@fastify/accepts-serializer was last scanned on 9 Oct 2026 at version 6.0.6. Risk score 5 of 100 (low). No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 9 Oct 2026.
  • Findings: 1 rule fired in version 6.0.6 (1 low). The score describes this version only.
  • Downloads: 17,600 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
6.0.6 LATEST 9 Oct 2026 1 rule fired
6.0.5 12 Aug 2026 No rules fired

Rules fired in 6.0.6: 1

Findings

1 Low

Findings for v6.0.6. 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.

Maintainer or owner changed

The package's maintainer or owner differs from the previous version. This is usually benign, such as a transfer or reorganization, but account takeovers look the same at first. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

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

Known vulnerabilities

1 CVE · last 4 May 2026

0 CRITICAL 1 HIGH 0 MEDIUM 0 LOW

Versions

  • ≥ 6.0.4
  • < 6.0.4 1 HIGH

Vulnerabilities

  • CVE-2026-7768 High 4 May 2026 @fastify/accepts-serializer Vulnerable to Denial of Service via Unbounded Accept Header Cache Growth Fixed in 6.0.4

README

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

@fastify/accepts-serializer

CI npm version neostandard javascript style

Serialize according to the Accept header.

Install

npm i @fastify/accepts-serializer
Compatibility
Plugin version Fastify version
>=6.x ^5.x
^5.x ^4.x
>=3.x <5.x ^3.x
^2.x ^2.x
^1.x ^1.x

Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin in the table above. See Fastify's LTS policy for more details.

Usage


const protobuf = require('protobufjs')
const YAML = require('yamljs')
const msgpack = require('msgpack5')()

const root = protobuf.loadSync('test/awesome.proto')
const AwesomeMessage = root.lookupType('awesomepackage.AwesomeMessage')

const fastify = require('fastify')()

// Global serializers
fastify.register(require('@fastify/accepts-serializer'), {
  serializers: [
    {
      regex: /^application\/yaml$/,
      serializer: body => YAML.stringify(body)
    },
    {
      regex: /^application\/x-msgpack$/,
      serializer: body => msgpack.encode(body)
    }
  ],
  default: 'application/yaml', // MIME type used if Accept header does not match anything
  cacheSize: 100               // max number of Accept header combinations to cache (default: 100)
})

// Per-router serializers
const config = {
  serializers: [
    {
      regex: /^application\/x-protobuf$/,
      serializer: body => AwesomeMessage.encode(AwesomeMessage.create(body)).finish()
    }
  ]
}

fastify.get('/request', { config }, function (req, reply) {
  reply.send({pippo: 'pluto'})
})

Options

Option Type Default Description
serializers Array [] List of serializer definitions, each with a regex and a serializer function
default string — MIME type to use when no serializer matches the Accept header. If omitted, unmatched requests receive a 406 response
cacheSize number 100 Maximum number of distinct Accept header combinations to cache. Entries are evicted in LRU order once the limit is reached

Behavior

For each route, a SerializerManager is defined, which has both per-route and global serializer definitions.

The MIME type application/json is always handled by fastify if no serializer is registered for that MIME type.

If no default key is specified in configuration, all requests with an unknown Accept header will be replied to with a 406 response (a boom error is used).

Serializer selection results are cached by Accept header value using an LRU cache bounded by cacheSize. This prevents unbounded memory growth from attacker-controlled Accept header variants.

License

Licensed under 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 @fastify/accepts-serializer

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

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229