VDB
Sign up
MEDIUM5.4

GHSA-76p7-773f-r4q5

Cross-site Scripting (XSS) in serialize-javascript

Quick fix

GHSA-76p7-773f-r4q5 — serialize-javascript: upgrade to the fixed version with the command below.

npm install serialize-javascript@6.0.2

Details

A flaw was found in npm-serialize-javascript. The vulnerability occurs because the serialize-javascript module does not properly sanitize certain inputs, such as regex or other JavaScript object types, allowing an attacker to inject malicious code. This code could be executed when deserialized by a web browser, causing Cross-site scripting (XSS) attacks. This issue is critical in environments where serialized data is sent to web clients, potentially compromising the security of the website or web application using this package.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/serialize-javascript
Introduced in: 6.0.0Fixed in: 6.0.2
Fixnpm install serialize-javascript@6.0.2

References