You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is Nodejs vulnerable to ICU: Integer overflow in UnicodeString::doAppend() (CVE-2020-10531)? #2716
Node.js 10.20.1 (can't run the test because of the Intl.ListFormat API)
-bash-4.2$ node CVE-2020-10531.js
{ http_parser: '2.9.3',
node: '10.20.1',
v8: '6.8.275.32-node.56',
uv: '1.34.2',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.15.0',
modules: '64',
nghttp2: '1.39.2',
napi: '6',
openssl: '1.1.1e',
icu: '64.2',
unicode: '12.1',
cldr: '35.1',
tz: '2019c' }
/home/users/riclau/tmp/CVE-2020-10531.js:6
console.log("len:", new Intl.ListFormat().format(Array(16).fill(s)).length);
^
TypeError: Intl.ListFormat is not a constructor
at Object.<anonymous> (/home/users/riclau/tmp/CVE-2020-10531.js:6:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
-bash-4.2$
Visually inspecting deps/icu-small/source/common/unistr.cpp in the Node.js source tree it looks like only 14.x/master using ICU 67.1 contains unicode-org/icu#971.
In terms of updating the release:
Node.js 14.x - N/A (uses ICU 67.1 which contains the fix for the CVE)
Node.js 13.x - Goes End-of-Life on 1 June 2020 so will either need to be patched next week or never
Node.js 12.x - nodejs/node#33337 proposes upgrading to ICU 67.1. @targos is the plan to get that into next week's 12.17.0?
Node.js 10.x - Testcase doesn't work so no idea if it is vulnerable but uses ICU 64.2 which doesn't contain the patch for the CVE.
Activity
Satishktp commentedon May 22, 2020
I don't know if this is the right place to enquire about his ICU vulnerability being used in Node.
Looking forward for inputs from Nodejs support
richardlau commentedon May 22, 2020
cc @nodejs/security
@srl295 Would it be possible to find out which versions of ICU were affected?
richardlau commentedon May 22, 2020
Adapting the testcase from https://bugs.chromium.org/p/chromium/issues/detail?id=1044570:
With Node.js 14.3.0:
Node.js 13.14.0:
Node.js 12.16.3:
Node.js 10.20.1 (can't run the test because of the
Intl.ListFormatAPI)Visually inspecting
deps/icu-small/source/common/unistr.cppin the Node.js source tree it looks like only 14.x/master using ICU 67.1 contains unicode-org/icu#971.richardlau commentedon May 22, 2020
In terms of updating the release:
Node.js 14.x - N/A (uses ICU 67.1 which contains the fix for the CVE)
Node.js 13.x - Goes End-of-Life on 1 June 2020 so will either need to be patched next week or never
Node.js 12.x - nodejs/node#33337 proposes upgrading to ICU 67.1. @targos is the plan to get that into next week's 12.17.0?
Node.js 10.x - Testcase doesn't work so no idea if it is vulnerable but uses ICU 64.2 which doesn't contain the patch for the CVE.
srl295 commentedon May 22, 2020
targos commentedon May 23, 2020
I included 67.1 in the v12.17.0 proposal.
sam-github commentedon Jun 3, 2020
The fix was released in the most recent 10.x sec release.
See https://nodejs.org/en/blog/vulnerability/june-2020-security-releases/
I think that fixes this issue.
meravkochavi commentedon Aug 10, 2020
I saw that the security issue affects version 58.1 as well.
If I cherry pick the changes from the changeset 'ICU-20958 Prevent SEGV_MAPERR in append'
unicode-org/icu@b7d08bc
(and add the missing function uprv_add32_overflow as well)
Should fix the issue for the CVE:
https://nvd.nist.gov/vuln/detail/CVE-2020-10531#vulnCurrentDescriptionTitle
for the 58.1 version ?