You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Security: Update serialize-javascript to 7.0.3 (CVE RCE) #521
The serialize-javascript package contains a code injection vulnerability that allows remote code execution. It is an incomplete fix for CVE-2020-7660.
RegExp.flags is interpolated directly into output without escaping
Date.prototype.toISOString() has a similar unescaped injection point
If an attacker controls the input object, they can inject malicious JavaScript via RegExp or Date objects. When the serialized string is evaluated (eval, Function constructor, or script tags), the injected code executes.
Proof of Concept
An attacker can create objects with spoofed properties that inject arbitrary code:
This addresses the CVE where RegExp.flags and Date.prototype.toISOString() allow code injection. I'd handle this by updating the serialize-javascript dependency to the patched version 7.0.3 and verifying no breaking changes. Can have a PR up in a few hours. I regularly manage dependency security in production Next.js apps.
Activity
snakefood3232 commentedon Apr 19, 2026
This addresses the CVE where
RegExp.flagsandDate.prototype.toISOString()allow code injection. I'd handle this by updating the serialize-javascript dependency to the patched version 7.0.3 and verifying no breaking changes. Can have a PR up in a few hours. I regularly manage dependency security in production Next.js apps.Anshumancanrock commentedon Apr 23, 2026
Hi @snakefood3232, if you need any help with this, I'd be happy to contribute. Just let me know!