CVE-2024-22018: fs.lstat bypasses permission model

Published Jul 8, 2024
·
Updated

A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to.

This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 22.

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

Other sources

A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.

— NVD

A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to.

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

— Node.Js

Node.js could allow a remote attacker to obtain sensitive information, caused by an inadequate permission model that fails to restrict file stats through the fs.lstat API. An attacker could exploit this vulnerability to retrieve stats from files that they do not have explicit read access to.

— IBM

Affected Software

15 affected componentsFixes available
IBM Controller<=11.1.0
IBM Controller<=11.0.0 - 11.0.1
Microsoft azl3 nodejs 20.14.0-15
Node.js Node.js>=20.0.0<20.15.1, >=22.0.0<22.4.1
20.15.122.4.1
Node.js Node.js>=20.0.0<20.15.1
20.15.1
Node.js Node.js>=22.0.0<22.4.1
22.4.1
alpine/nodejs<20.15.1-r0
20.15.1-r0
alpine/nodejs<20.15.1-r0
20.15.1-r0
alpine/nodejs<20.15.1-r0
20.15.1-r0
alpine/nodejs<20.15.1-r0
20.15.1-r0
alpine/nodejs<20.15.1-r0
20.15.1-r0
alpine/nodejs<20.15.1-r0
20.15.1-r0
debian/nodejs<20.15.1+dfsg-1
20.15.1+dfsg-1
debian/nodejs<20.15.1+dfsg-1
20.15.1+dfsg-1
debian/nodejs
18.20.4+dfsg-1~deb12u218.20.4+dfsg-1~deb12u320.19.2+dfsg-1+deb13u220.19.2+dfsg-1+deb13u324.21.0+dfsg+~cs24.13.4-124.22.2+dfsg+~cs24.19.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 20.15.1Fixed in 22.4.1
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 20.15.1
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 22.4.1
  4. Upgrade

    Upgrade alpine/nodejs to a version that resolves this vulnerability.

    Fixed in 20.15.1-r0
  5. Upgrade

    Upgrade debian/nodejs to a version that resolves this vulnerability.

    Fixed in 20.15.1+dfsg-1
  6. Upgrade

    Upgrade debian/nodejs to a version that resolves this vulnerability.

    Fixed in 18.20.4+dfsg-1~deb12u2Fixed in 18.20.4+dfsg-1~deb12u3Fixed in 20.19.2+dfsg-1+deb13u2Fixed in 20.19.2+dfsg-1+deb13u3Fixed in 24.21.0+dfsg+~cs24.13.4-1Fixed in 24.22.2+dfsg+~cs24.19.2-1

Event History

Jul 8, 2024
CVE Published
via Node.js·03:00 AM
Data Sourced
via Node.js·03:00 AM
DescriptionSeverityAffected Software
Jul 10, 2024
CVE Published
via MITRE·01:00 AM
Data Sourced
via MITRE·01:00 AM
DescriptionSeverity
Data Sourced
via NVD·02:15 AM
DescriptionSeverity
Data Sourced
via OSV·02:15 AM
DescriptionSeverityAffected Software
Data Sourced
via Red Hat·02:20 AM
DescriptionSeverityAffected Software
Feb 28, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Sep 4, 2025
Data Sourced
via Microsoft·03:12 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2024-22018?

The severity of CVE-2024-22018 is categorized as medium due to its impact on the file permission model.

2

How do I fix CVE-2024-22018?

To fix CVE-2024-22018, users should avoid using the --allow-fs-read flag in Node.js or update to a patched version that addresses the vulnerability.

3

Who is affected by CVE-2024-22018?

CVE-2024-22018 specifically affects users of Node.js who utilize the experimental permission model and the --allow-fs-read flag.

4

What components are impacted by CVE-2024-22018?

CVE-2024-22018 impacts the fs.lstat API, allowing unauthorized access to file statistics.

5

Are there any workarounds for CVE-2024-22018?

A workaround for CVE-2024-22018 is to refrain from using the experimental permission model features until a fix is applied.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203