Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@apphosting/adapter-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apphosting/adapter-nextjs",
"version": "14.0.18",
"version": "14.0.19",
"main": "dist/index.js",
"description": "Experimental addon to the Firebase CLI to add web framework support",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/@apphosting/adapter-nextjs/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ describe("block vulnerable nextjs versions", () => {
checkNextJSVersion("15.0.5");
});

assert.throws(() => {
checkNextJSVersion("15.4.7");
});

assert.doesNotThrow(() => {
checkNextJSVersion("15.4.8");
});

assert.doesNotThrow(() => {
checkNextJSVersion("14.0.12");
});
Expand Down
4 changes: 2 additions & 2 deletions packages/@apphosting/adapter-nextjs/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export const { copy, exists, writeFile, readJson, readdir, readFileSync, existsS
export const { satisfies } = semVer;

const SAFE_NEXTJS_VERSIONS =
">=16.1.0 || ^16.0.7 || ^v15.5.7 || ^v15.4.8 || ^v15.3.6 || ^v15.2.6 || ^v15.1.9 || ^v15.0.5 || <14.3.0-canary.77";
">=16.1.0 || ~16.0.7 || ~v15.5.7 || ~v15.4.8 || ~v15.3.6 || ~v15.2.6 || ~v15.1.9 || ~v15.0.5 || <14.3.0-canary.77";

export function checkNextJSVersion(version: string | undefined) {
if (!version) {
return;
}
if (!satisfies(version, SAFE_NEXTJS_VERSIONS)) {
throw new Error(
`CVE-2025-55182: Vulnerable Next version ${version} detected. Deployment blocked. Update your app's dependencies to a patched Next.js version and redeploy:https://nextjs.org/blog/CVE-2025-66478#fixed-versions`,
`CVE-2025-55182: Vulnerable Next version ${version} detected. Deployment blocked. Update your app's dependencies to a patched Next.js version and redeploy: https://nextjs.org/blog/CVE-2025-66478#fixed-versions`,
);
}
}
Expand Down