Repository navigation
Description
Summary
GHSA-688c-gxc8-6xqp is a dependency confusion attack on nr-reports-core. The metadata is incorrect in ways specific to this type of attack.
Description
The attempted substitution is for a sub-package within the top-level package nr-reports. My work here is to restore the target of the attack to a functioning state. That target is within https://github.com/newrelic/nr-reports at the subdirectory https://github.com/newrelic/nr-reports/tree/main/nr-reports-cli. It can only be accessed by:
git clone https://github.com/newrelic/nr-reports
cd nr-reports-cli
npm install
There is no public version of the original package in NPM. Only the substitute was available there. NPMJS.org has disabled the substitute package, so it is no longer accessible.
It is important to correct these because they perpetuate the harm caused by the attack. The underlying package under attack is entirely blocked as a result of these inaccuracies, which magnifies the damage. There is no longer any risk to the user community because the substituted malicious package is offline.
Corrections
- Version
In the Advisory, the version introduced is listed as 0, with no patch. This is wrong. The targeted versions are 0.0.1 and 1.1.1. The version on the current release (the real one, not the substitute) is 3.4.0. If the version listed in the metadata were correct, the attack would fail and the targets would return to a functioning state. In the meantime the target package cannot be used in any version.
- CWE
The CWE in the advisory is incorrect. It is given as:
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
However, that is wrong. A dependency confusion attack is classified as CWE-427: Uncontrolled Search Path Element.
Activity
lucasgonze commentedon Feb 5, 2025
See also ossf/malicious-packages#799 for informative discussion.
I am available for real-time discussion in the OpenSSF Slack under the username Lucas Gonze.
shelbyc commentedon Feb 7, 2025
Hi @lucasgonze, I shared this issue with my colleagues and we're coordinating on a solution. I want to let you know that we're working behind the scenes and thank you for your patience!
lucasgonze commentedon Feb 11, 2025
Is there anything our team can do to assist? The underlying package at version 3.4.0 is still inoperable as a result of the incorrect Affected versions string
>= 0shelbyc commentedon Feb 12, 2025
Hi @lucasgonze, as in ossf/malicious-packages#799, GHSA-688c-gxc8-6xqp has been changed to show
1.1.1as the only malicious version and CWE-427 has been added alongside CWE-506.If you and/or the https://github.com/newrelic/nr-reports team need help with transferring ownership of the
nr-reports-corenamespace, please reach out to https://www.npmjs.com/support.Thanks for your patience and have a great week!
lucasgonze commentedon Feb 12, 2025
Thank you for this timely resolution.