Bugzilla – Bug 987863
VUL-0: CVE-2016-3956: nodejs,npm: npm bearer token leak
Last modified: 2016-07-06 18:05:38 UTC
https://nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016/ The primary npm registry has, since late 2014, used HTTP bearer tokens to authenticate requests from the npm command-line interface. Due to a design flaw in the CLI, these bearer tokens were sent with every request made by the CLI for logged-in users, regardless of the destination of the request. They should instead only be included for requests made against the registry or registries used for the current install. This flaw allows an attacker to set up an HTTP server that could collect authentication information they could use to impersonate the users whose tokens they collected. This impersonation would allow them to do anything the compromised users could do, including publishing new versions of packages. This flaw has been fixed in npm@2.15.1 (npm LTS) and npm@3.8.3. The npm CLI team believes that the fix won't break any existing registry setups, but due to the large number of registry software suites in the wild, it's possible that this change will be breaking in some cases. If so, please file an issue describing the software you're using and how it broke, and the team will work with you to mitigate the breakage. If you believe that your bearer token may have been leaked, it should be sufficient to invalidate your current npm bearer tokens and to rerun npm login to generate new tokens. Keep in mind that this may cause continuous integration builds in services like Travis to break, in which case you'll need to update the tokens in your CI server's configuration. Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James Taylor for reporting this vulnerability to npm. As Node.js ships with npm, releases for the active lines will be made available shortly for your convenience. Please watch the Node.js news feed for the following releases: v0.10 (Maintenance): Node.js v0.10.44 includes npm LTS v2.15.1. This is a major upgrade of npm from v1 which has previously been deprecated. No fix is being made available for npm v1, please upgrade to npm v2 as soon as possible. v0.12 (LTS): Node.js v0.12.13 includes npm LTS v2.15.1. v4 (LTS "Argon"): Node.js v4.4.2 includes npm LTS v2.15.1. v5 (Stable): Node.js v5.10.0 includes npm v3.8.3. References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3956 https://nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016/ https://github.com/npm/npm/issues/8380 http://www-01.ibm.com/support/docview.wss?uid=swg21980827 http://blog.npmjs.org/post/142036323955/fixing-a-bearer-token-vulnerability http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3956 http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-3956.html
https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401 https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29
13.2 already fixed. openSUSE Leap 42.1 already fixed.