Skip to content
OpenAdvisories
High · 7.5 CVE-2023-30581 EUVD-2023-34962GHSA-86v4-9wq7-fx97

The use of __proto__ in process.mainModule.__proto__.require() can bypass the policy mechanism and require modules outside of the policy.js…

Published Nov 22, 2023 · Updated Nov 3, 2025 · Assigned by hackerone

Description

The use of __proto__ in process.mainModule.__proto__.require() can bypass the policy mechanism and require modules outside of the policy.json definition. This vulnerability affects all users using the experimental policy mechanism in all active release lines: v16, v18 and, v20.

Please note that at the time this CVE was issued, the policy is an experimental feature of Node.js

Affected products

VendorProductAffectedFixed
NodeJS Node 4.0 – < 4.*, 5.0 – < 5.*, 6.0 – < 6.*, 7.0 – < 7.*, 8.0 – < 8.*, 9.0 – < 9.*, 10.0 – < 10.*, 11.0 – < 11.*, 12.0 – < 12.*, 13.0 – < 13.*, 14.0 – < 14.*, 15.0 – < 15.*, 16.0 – < 16.20.1, 17.0 – < 17.*, 18.0 – < 18.16.1, 19.0 – < 19.*, 20.0 – < 20.3.1 4.*

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 nodejs 18.13.0+dfsg1-1.1 —
Debian 13 nodejs 18.13.0+dfsg1-1.1 —
Debian 12 nodejs 18.19.0+dfsg-6~deb12u1 DSA-5589-1
ReleasePackageFixed inAdvisory
RHEL 9 nodejs +3 1:16.20.1-1.el9_2 RHSA-2023:4331, RHSA-2023:4330
RHEL 9 nodejs-devel 1:18.16.1-1.module+el9.2.0.z+19424+78951f07 RHSA-2023:4330
RHEL 9 nodejs-nodemon 2.0.20-2.module+el9.2.0.z+18497+a402347c RHSA-2023:4330
RHEL 9 nodejs-packaging +1 2021.06-4.module+el9.1.0+15718+e52ec601 RHSA-2023:4330
RHEL 9 npm 1:8.19.4-1.16.20.1.1.el9_2 RHSA-2023:4331, RHSA-2023:4330
RHEL 8 nodejs +3 1:16.20.1-1.module+el8.8.0+19440+ee8dbee5 RHSA-2023:4537, RHSA-2023:4536
RHEL 8 nodejs-nodemon 2.0.20-2.module+el8.8.0+18432+27f188ac RHSA-2023:4537, RHSA-2023:4536
RHEL 8 nodejs-packaging 25-1.module+el8.5.0+10992+fac5fe06 RHSA-2023:4537, RHSA-2023:4536
RHEL 8 nodejs-packaging-bundler 2021.06-4.module+el8.7.0+15582+19c314fa RHSA-2023:4536
RHEL 8 npm 1:8.19.4-1.16.20.1.1.module+el8.8.0+19440+ee8dbee5 RHSA-2023:4537, RHSA-2023:4536
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.0 EUS nodejs +3 1:16.20.2-1.el9_0 RHSA-2023:5533
RHEL 9.0 EUS npm 1:8.19.4-1.16.20.2.1.el9_0 RHSA-2023:5533
RHEL 8.6 EUS nodejs +3 1:16.20.2-2.module+el8.6.0+19897+9590a839 RHSA-2023:5361
RHEL 8.6 EUS nodejs-nodemon 3.0.1-1.module+el8.6.0+19765+366b9144 RHSA-2023:5361
RHEL 8.6 EUS nodejs-packaging 26-1.module+el8.6.0+19856+c0c87259 RHSA-2023:5361
RHEL 8.6 EUS npm 1:8.19.4-1.16.20.2.2.module+el8.6.0+19897+9590a839 RHSA-2023:5361

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 nodejs +3 1:16.20.1-1.el9_2 ALSA-2023:4331, ALSA-2023:4330
AlmaLinux 9 nodejs-devel 1:18.16.1-1.module_el9.2.0+31+cbae0c8e ALSA-2023:4330
AlmaLinux 9 nodejs-nodemon 2.0.20-2.module_el9.2.0+29+de583a0b ALSA-2023:4330
AlmaLinux 9 nodejs-packaging +1 2021.06-4.module_el9.1.0+13+d9a595ea ALSA-2023:4330
AlmaLinux 9 npm 1:8.19.4-1.16.20.1.1.el9_2 ALSA-2023:4331, ALSA-2023:4330
AlmaLinux 8 nodejs +3 1:16.20.1-1.module_el8.8.0+3594+e74fe53f ALSA-2023:4537, ALSA-2023:4536
AlmaLinux 8 nodejs-nodemon 2.0.20-2.module_el8.8.0+3587+ee652244 ALSA-2023:4537, ALSA-2023:4536
AlmaLinux 8 nodejs-packaging 25-1.module_el8.5.0+2605+45d748af ALSA-2023:4537, ALSA-2023:4536
AlmaLinux 8 nodejs-packaging-bundler 2021.06-4.module_el8.7.0+3343+ea2b7901 ALSA-2023:4536
AlmaLinux 8 npm 1:8.19.4-1.16.20.1.1.module_el8.8.0+3594+e74fe53f ALSA-2023:4537, ALSA-2023:4536

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 nodejs-packaging 2021.06-4.module+el9.7.0+40022+9ecc286c RLSA-2023:4330
Rocky Linux 8 nodejs 1:18.16.1-1.module+el8.8.0+1413+a47876c7 RLSA-2023:4536
Rocky Linux 8 nodejs-nodemon 2.0.20-2.module+el8.7.0+1177+510ae886 RLSA-2023:4537, RLSA-2023:4536
Rocky Linux 8 nodejs-packaging 25-1.module+el8.7.0+1108+49363b0d RLSA-2023:4537, RLSA-2023:4536
ReleasePackageFixed inAdvisory
SLES 15 SP5 nodejs18 18.16.1-150400.9.9.1 SUSE-SU-2023:2669-1
SLES 15 SP4 nodejs16 16.20.1-150400.3.21.1 SUSE-SU-2023:2663-1
SLES 15 SP4 nodejs18 18.16.1-150400.9.9.1 SUSE-SU-2023:2669-1
SLES 15 SP3 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLES 15 SP3 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SLES 15 SP3 nodejs16 16.20.1-150300.7.24.2 SUSE-SU-2023:2861-1
SLES 15 SP2 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLES 15 SP2 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SLES 12 nodejs14 14.21.3-6.46.1 SUSE-SU-2023:3306-1
SLES 12 nodejs16 16.20.1-8.30.1 SUSE-SU-2023:2655-1
SLES 12 nodejs18 18.16.1-8.9.1 SUSE-SU-2023:2662-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLES for SAP 15 SP3 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SLES for SAP 15 SP3 nodejs16 16.20.1-150300.7.24.2 SUSE-SU-2023:2861-1
SLES for SAP 15 SP2 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLES for SAP 15 SP2 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SLE HPC 15 SP3 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLE HPC 15 SP3 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SLE HPC 15 SP3 nodejs16 16.20.1-150300.7.24.2 SUSE-SU-2023:2861-1
SLE HPC 15 SP2 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SLE HPC 15 SP2 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SUSE Manager Server 4.2 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SUSE Manager Server 4.2 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SUSE Manager Server 4.2 nodejs16 16.20.1-150300.7.24.2 SUSE-SU-2023:2861-1
SUSE Enterprise Storage 7.1 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
SUSE Enterprise Storage 7.1 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
SUSE Enterprise Storage 7.1 nodejs16 16.20.1-150300.7.24.2 SUSE-SU-2023:2861-1
SUSE Enterprise Storage 7 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed nodejs20 20.3.1-1.1 openSUSE-SU-2024:13021-1
openSUSE Leap 15.5 nodejs18 18.16.1-150400.9.9.1 SUSE-SU-2023:2669-1
openSUSE Leap 15.4 nodejs12 12.22.12-150200.4.50.1 SUSE-SU-2023:3455-1
openSUSE Leap 15.4 nodejs14 14.21.3-150200.15.49.1 SUSE-SU-2023:3408-1
openSUSE Leap 15.4 nodejs16 16.20.1-150400.3.21.1 SUSE-SU-2023:2663-1
openSUSE Leap 15.4 nodejs18 18.16.1-150400.9.9.1 SUSE-SU-2023:2669-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 nodejs +4 1:18.12.1-1.amzn2023.0.7 ALAS2023-2023-237
Amazon Linux 2023 npm 1:8.19.2-1.18.12.1.1.amzn2023.0.7 ALAS2023-2023-237
Amazon Linux 2023 v8-devel 2:10.2.154.15-1.18.12.1.1.amzn2023.0.7 ALAS2023-2023-237

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 nodejs +3 1:16.20.1-1.el9_2 ELSA-2023-4331, ELSA-2023-4330
Oracle Linux 9 nodejs-devel 1:18.16.1-1.module+el9.2.0+21133+486db26c ELSA-2023-4330
Oracle Linux 9 nodejs-nodemon 2.0.20-2.module+el9.2.0+21038+115df6a2 ELSA-2023-4330
Oracle Linux 9 nodejs-packaging +1 2021.06-4.module+el9.1.0+20762+f52d7401 ELSA-2023-4330
Oracle Linux 9 npm 1:8.19.4-1.16.20.1.1.el9_2 ELSA-2023-4331, ELSA-2023-4330
Oracle Linux 8 nodejs +3 1:16.20.1-1.module+el8.8.0+21143+178952bb ELSA-2023-4537, ELSA-2023-4536
Oracle Linux 8 nodejs-nodemon 2.0.20-2.module+el8.8.0+21140+54ee8b93 ELSA-2023-4537, ELSA-2023-4536
Oracle Linux 8 nodejs-packaging 25-1.module+el8.5.0+20388+4b61e68d ELSA-2023-4537, ELSA-2023-4536
Oracle Linux 8 nodejs-packaging-bundler 2021.06-4.module+el8.7.0+20766+0a247725 ELSA-2023-4536
Oracle Linux 8 npm 1:8.19.4-1.16.20.1.1.module+el8.8.0+21143+178952bb ELSA-2023-4537, ELSA-2023-4536

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling nodejs-16 16.20.1-r0 —
Wolfi rolling nodejs-18 18.16.1-r0 —
Wolfi rolling nodejs-20 20.3.1-r0 —

Advisories 32

References