From f0490682abdb657f90a7ad2d1a45c8f1275638a6 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 27 Apr 2026 21:03:25 +0700 Subject: [PATCH] chore(deps): pin serialize-javascript via npm overrides Workbox/vite-plugin-pwa pull in @rollup/plugin-terser, which depends on older serialize-javascript versions with a known RCE/DoS chain. Overriding to >=7.0.5 surgically clears the chain without dropping vite-plugin-pwa to the 0.19.x major. npm audit now reports 0 vulnerabilities; build is unaffected (build-only deps). --- package-lock.json | 68 ++++++++++++++++++++++++++--------------------- package.json | 3 +++ 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 775eb83..8a4da87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2011,6 +2011,9 @@ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2025,6 +2028,9 @@ "arm" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2067,6 +2073,9 @@ "loong64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2081,6 +2090,9 @@ "loong64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2095,6 +2107,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2109,6 +2124,9 @@ "ppc64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2123,6 +2141,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2137,6 +2158,9 @@ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2151,6 +2175,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2165,6 +2192,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2179,6 +2209,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -4134,14 +4167,6 @@ "node": ">=6" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "dev": true, @@ -4321,25 +4346,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/safe-push-apply": { "version": "1.0.0", "dev": true, @@ -4380,11 +4386,13 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.2", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz", + "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==", "dev": true, "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=20.0.0" } }, "node_modules/set-function-length": { diff --git a/package.json b/package.json index eb605cd..7bdc5ba 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,8 @@ "svelte": "^5.19.0", "vite": "^6.4.2", "vite-plugin-pwa": "^1.2.0" + }, + "overrides": { + "serialize-javascript": ">=7.0.5" } }