Dev Blog

BLOG

Do the three Next.js vulnerabilities from October 2026 affect Metronome.fm?

We checked the three issues fixed in the Next.js security update of October 14, 2026 against Metronome.fm's code. The Server Actions DoS did affect us, and here is what would stop and what would keep running under attack. We had already closed off the image optimization RCE, and the use cache RCE didn't apply because we don't use use cache.

Published October 16, 2026

On October 14, 2026, Next.js shipped an out-of-band security update (Next.js Security Update for Upstream Vulnerabilities). It fixed three vulnerabilities, two of them rated Critical, the highest severity.

Metronome.fm was running Next.js 16.3.8. All three affect the 16.x line up to 16.4.0, so 16.3.8 was in range for every one of them. The fixes landed in 16.4.1 and 15.5.28, and there is no patched release on the 16.3 line.

Being in range does not mean an app can actually be attacked, though. That depends on how the app uses Next.js. We checked all three against our code, and one of them affected us.

Vulnerability
Severity
Metronome.fm
Crafted requests to Server Actions exhaust the CPU (DoS)
High
Affected
Handling SVG in image optimization allows arbitrary code execution (RCE)
Critical
Closed six days before the Next.js announcement
A use cache function returning typed arrays allows arbitrary code execution (RCE)
Critical
We don't use use cache

This post explains what each vulnerability is and what could have happened to this app. At the end, we cover upgrading Next.js to 16.4.2.

RCE and DoS

First, two terms.

RCE (Remote Code Execution) is a vulnerability that lets someone make the server run any program they like by sending it a request. They could read the server's environment variables (database connection strings, API keys) or change data. It is one of the most serious kinds of vulnerability.

DoS (Denial of Service) is an attack that loads a server until it cannot be used. No data leaks, but other people can no longer use the app.

All three of these could be attacked from outside without signing in.

The Server Actions DoS affected us

Server Actions are server functions you can call from the browser. Put "use server" at the top of a file, and client components can call the functions in it like ordinary functions. Under the hood, the browser sends a POST request to the page URL, and Next.js decodes the arguments and runs the function.

Metronome.fm uses Server Actions for saving settings, recording statistics, calling the AI, checking the playback limit and more. We have 29 files that start with "use server".

We checked the details in the Next.js security advisories published on GitHub.

The GitHub page for Next.js advisory GHSA-p3m5-59mp-jv5r. Number 1 marks the affected and patched versions, number 2 the impact description, and number 3 the CVSS row where Availability is High
The Server Actions DoS advisory (captured October 16, 2026)
  1. 16.0.0 through 16.4.0 are affected, fixed in 16.4.1
  2. Crafted requests to an App Router app with at least one Server Action can exhaust the CPU and block later requests in the same process
  3. Only availability is affected. Confidentiality and integrity are None (no data leaks or changes)

The only conditions are that the app uses the App Router and has at least one Server Action. Metronome.fm meets both.

Inside each Server Action, the first thing we do is check whether the user is signed in.

export async function toggleMetronomePublic(settingId: string /* … */) {
  const { userId: clerkId } = await auth();
  if (!clerkId) {
    return { success: false, error: "Authentication required. Please sign in." };
  }
  // …
}

That check only runs once the function has started, though. Before the function runs, Next.js and React decode the arguments from the incoming request. The advisory does not describe the cause. But its CVSS score lists Privileges Required as None, meaning no sign-in is needed to exploit it. So we assumed the check inside the function would not stop it, and decided to upgrade to a patched version (covered in the last section).

What would stop if we were attacked

According to the advisory, a process that has used up its CPU cannot handle the requests that come after. For Metronome.fm, the following actions, which depend on the server, would stop.

  • Opening a page or moving between pages
  • Saving and loading settings
  • Asking the AI for a BPM or for a setting

The metronome sound would not stop, however. The sound is played by an AudioWorklet in the browser and runs without the server.

Checking the playback limit (the daily playback time for guests and the free plan) is also a Server Action. When the server cannot be reached, though, we count playback in a record kept in the browser's localStorage (the code calls it a ledger). We built this when we made the app usable offline, and the counted time is sent in one batch once the connection is back.

} catch (error) {
  // While offline this fails every 10 seconds, so don't send it to the logs
  // …
}
// When we can't check with the server (offline, or the server is having trouble), count with the local ledger

Practice time statistics work the same way. Anything that cannot be sent is kept in the browser and sent later.

So people who already have the app open and are practicing can keep practicing. The people affected are those trying to open the app, and those doing something that needs the server, such as saving.

We had closed the image optimization RCE six days earlier

Images rendered with next/image go through the /_next/image URL, which resizes and converts them before serving (image optimization). The conversion uses a library called sharp.

The GitHub page for Next.js advisory GHSA-2464-fhr4-w9xw. Number 1 marks the affected and patched versions, number 2 the impact description, and number 3 the workaround
The image optimization RCE advisory (captured October 16, 2026)
  1. 15.5.27 and earlier, and 16.x up to 16.4.0, are affected
  2. An upstream library used for image optimization (sharp) has a memory-related vulnerability that can allow arbitrary code execution on glibc-based Linux
  3. The workaround is to make sure the sharp used by Next.js is 0.35.5 or later

Metronome.fm uses next/image for screenshots in the blog and release notes, and for account avatars (images from Clerk). This vulnerability involves handling SVG, but the advisory does not say which configurations send SVG through optimization. So we could not decide from our usage whether we were affected. Instead, we judged by whether we already met the workaround (sharp 0.35.5 or later).

On October 8, we had required sharp 0.35.5 or later and shipped that to production. pnpm audit, which checks dependencies for known vulnerabilities, had reported a vulnerability in the sharp that Next.js depends on (CVE-2026-96889).

"pnpm": {
  "overrides": {
    "sharp@<0.35.5": "^0.35.5"
  }
}

This is the same CVE number that this advisory lists. In other words, we had started using sharp's patched release six days before the Next.js announcement.

Metronome.fm is deployed on Vercel, where Vercel handles image optimization and serves the results from its CDN. We could not confirm which sharp version is used there. So we did not assume we were safe just because Vercel handles it.

We did not use use cache

use cache tells Next.js to cache a function's result. Put "use cache" at the top of a function, and calling it again with the same arguments returns the earlier result. This vulnerability can be exploited when such a function returns multiple typed arrays (Uint8Array and so on).

The GitHub page for Next.js advisory GHSA-673q-mjm6-r5xr. Number 1 marks the affected and patched versions, number 2 the impact description, and number 3 the workaround
The use cache RCE advisory (captured October 16, 2026)
  1. 16.0.0 through 16.4.0 are affected, fixed in 16.4.1
  2. In an App Router app with Cache Components (the Next.js setting that enables use cache) turned on, a use cache function that returns multiple typed arrays can allow arbitrary code execution
  3. There is no workaround, and it recommends upgrading right away even without such functions

Metronome.fm does not use use cache. To cache the functions that read saved settings, we chose unstable_cache, which on Vercel persists across instances and deployments.

// On Vercel, unstable_cache is stored in the Data Cache and shared across instances and deployments.
// "use cache" stores in instance memory by default, which doesn't persist on serverless, so we don't use it here

We chose it based on whether the cache persists, not to avoid a security risk. As a result, though, this vulnerability did not affect us.

Upgrading to 16.4.2

One of the three affected us, and for the other two the advisories also recommend upgrading to a patched version. We upgraded Next.js to 16.4.2. React, which sits upstream of Next.js, also had two advisories published the same day, so we upgraded it to the patched 19.3.1 as well.

-    "next": "16.3.8",
+    "next": "16.4.2",
-    "react": "19.3.0",
+    "react": "19.3.1",
-    "react-dom": "19.3.0",
+    "react-dom": "19.3.1",

Going from 16.3 to 16.4 is a minor version upgrade. The breaking changes in the release notes did not touch anything in this app's configuration. Type checking, lint, the build and the unit tests all passed without code changes.

Looking back, what helped was running pnpm audit on October 8. Because we had already looked at our dependencies' vulnerabilities, we had closed one of the three without waiting for the Next.js announcement.

Share this post

Post on X