CVE-2020-8174: napi_get_value_string_*() allows various kinds of memory corruption

Published Jun 2, 2020
·
Updated

A flaw was found in nodejs. Calling napigetvaluestringlatin1(), napigetvaluestringutf8(), or napigetvaluestringutf16() with a non-NULL buf, and a bufsize of 0 will cause the entire string value to be written to buf, probably overrunning the length of the buffer.

Other sources

Calling napigetvaluestringlatin1(), napigetvaluestringutf8(), or napigetvaluestringutf16() with a non-NULL buf, and a bufsize of 0 will cause the entire string value to be written to buf, probably overrunning the length of the buffer.

A exploit has not been reported and it may be difficult but the following is suggested:

All users of LTS Node.js versions should update to the versions announced in this security post. This will address the issue for any non pre-built add-on.

Maintainers who support EOL Node.js versions and/or build against a version of Node.js that did not support N-API internally should update to use the new versions of node-addon-api 1.x and 2.x that will be released soon after this announcement.

The N-API version matrix shows which versions of Node.js in which this support was added.

— Node.Js

Calling napigetvaluestringlatin1(), napigetvaluestringutf8(), or napigetvaluestringutf16() with a non-NULL buf, and a bufsize of 0 will cause the entire string value to be written to buf, probably overrunning the length of the buffer.

Reference: https://nodejs.org/en/blog/vulnerability/june-2020-security-releases/

— Red Hat

napigetvaluestring() allows various kinds of memory corruption in node < 10.21.0, 12.18.0, and < 14.4.0.

Affected Software

58 affected componentsFixes available
redhat/rh-nodejs12-nodejs<0:12.18.2-1.el7
0:12.18.2-1.el7
redhat/rh-nodejs10-nodejs<0:10.21.0-3.el7
0:10.21.0-3.el7
redhat/nodejs<10.21.0
10.21.0
redhat/nodejs<12.18.0
12.18.0
redhat/nodejs<14.4.0
14.4.0
debian/nodejs
12.22.12~dfsg-1~deb11u412.22.12~dfsg-1~deb11u518.19.0+dfsg-6~deb12u218.19.0+dfsg-6~deb12u120.17.0+dfsg-2
Nodejs Node.js<10.21.0
Nodejs Node.js>=12.0.0<12.18.0
Nodejs Node.js>=14.0.0<14.4.0
Oracle Banking Extensibility Workbench=14.3.0
Oracle Banking Extensibility Workbench=14.4.0
Oracle Blockchain Platform<21.1.2
Oracle MySQL Cluster<=7.3.30
Oracle MySQL Cluster>=7.4.0<=7.4.29
Oracle MySQL Cluster>=7.5.0<=7.5.19
Oracle MySQL Cluster>=7.6.0<=7.6.15
Oracle MySQL Cluster>=8.0.0<=8.0.21
Oracle Retail Xstore Point of Service=16.0.6
Oracle Retail Xstore Point of Service=17.0.4
Oracle Retail Xstore Point of Service=18.0.3
Oracle Retail Xstore Point of Service=19.0.2
Oracle Retail Xstore Point of Service=20.0.1
NetApp Active Iq Unified Manager Vmware Vsphere
NetApp Active Iq Unified Manager Windows
NetApp OnCommand Insight
NetApp OnCommand Workflow Automation
NetApp Snapcenter
Node.js Node.js>=10.0.0<10.21.0, >=12.0.0<12.18.0, >=14.0.0<14.4.0
10.21.012.18.014.4.0
Node.js Node.js>=10.0.0<10.21.0
10.21.0
Node.js Node.js>=12.0.0<12.18.0
12.18.0
Node.js Node.js>=14.0.0<14.4.0
14.4.0
alpine/nodejs<12.20.1-r0
12.20.1-r0
alpine/nodejs<12.18.3-r0
12.18.3-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs<12.18.0-r0
12.18.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0
alpine/nodejs-current<14.4.0-r0
14.4.0-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rh-nodejs12-nodejs to a version that resolves this vulnerability.

    Fixed in 0:12.18.2-1.el7
  2. Upgrade

    Upgrade redhat/rh-nodejs10-nodejs to a version that resolves this vulnerability.

    Fixed in 0:10.21.0-3.el7
  3. Upgrade

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

    Fixed in 10.21.0
  4. Upgrade

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

    Fixed in 12.18.0
  5. Upgrade

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

    Fixed in 14.4.0
  6. Upgrade

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

    Fixed in 12.22.12~dfsg-1~deb11u4Fixed in 12.22.12~dfsg-1~deb11u5Fixed in 18.19.0+dfsg-6~deb12u2Fixed in 18.19.0+dfsg-6~deb12u1Fixed in 20.17.0+dfsg-2
  7. Upgrade

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

    Fixed in 10.21.0Fixed in 12.18.0Fixed in 14.4.0
  8. Upgrade

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

    Fixed in 10.21.0
  9. Upgrade

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

    Fixed in 12.18.0
  10. Upgrade

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

    Fixed in 14.4.0
  11. Upgrade

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

    Fixed in 12.20.1-r0
  12. Upgrade

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

    Fixed in 12.18.3-r0
  13. Upgrade

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

    Fixed in 12.18.0-r0
  14. Upgrade

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

    Fixed in 14.4.0-r0
  15. Upgrade

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

    Fixed in 10.21.0
  16. Upgrade

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

    Fixed in 12.18.0
  17. Upgrade

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

    Fixed in 14.4.0

Event History

Jun 2, 2020
CVE Published
12:00 AM
Data Sourced
via Node.js·12:00 PM
DescriptionSeverityAffected Software
Jul 24, 2020
CVE Published
via MITRE·09:45 PM
Data Sourced
via MITRE·09:45 PM
DescriptionWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·10:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2020-8174?

CVE-2020-8174 is a vulnerability found in nodejs that allows various kinds of memory corruption.

2

How does CVE-2020-8174 affect nodejs?

Calling certain functions with a non-NULL buf and bufsize of 0 can cause a buffer overrun.

3

What is the severity of CVE-2020-8174?

CVE-2020-8174 has a severity value of 8.1 (high).

4

Which versions of nodejs are affected by CVE-2020-8174?

Nodejs versions < 10.21.0, 12.18.0, and < 14.4.0 are affected by CVE-2020-8174.

5

How can I fix CVE-2020-8174 in nodejs?

Upgrade to version 10.21.0, 12.18.0, or 14.4.0 or later to fix CVE-2020-8174 in nodejs.

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