Skip to content

Code Execution through IIFE in node-serialize

Critical severity GitHub Reviewed Published Jul 18, 2018 to the GitHub Advisory Database • Updated Feb 1, 2023

Package

npm node-serialize (npm)

Affected versions

<= 0.0.4

Patched versions

None

Description

Affected versions of node-serialize can be abused to execute arbitrary code via an immediately invoked function expression (IIFE) if untrusted user input is passed into unserialize().

Recommendation

There is no direct patch for this issue. The package author has reviewed this advisory, and provided the following recommendation:

To avoid the security issues, at least one of the following methods should be taken:

1. Make sure to send serialized strings internally, isolating them from potential hackers. For example, only sending the strings from backend to fronend and always using HTTPS instead of HTTP.

2. Introduce public-key cryptosystems (e.g. RSA) to ensure the strings not being tampered with.

References

Published by the National Vulnerability Database Feb 9, 2017
Published to the GitHub Advisory Database Jul 18, 2018
Reviewed Jun 16, 2020
Last updated Feb 1, 2023

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2017-5941

GHSA ID

GHSA-q4v7-4rhw-9hqm

Source code

No known source code
Checking history
See something to contribute? Suggest improvements for this vulnerability.