Skip to content

Incorrect metadata on GHSA-688c-gxc8-6xqp #5248

Closed

Description

@lucasgonze

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

  1. 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.

  1. 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

  1. lucasgonze commented on Feb 5, 2025

    @lucasgonze
    Author

    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.

  2. shelbyc commented on Feb 7, 2025

    @shelbyc
    Contributor

    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!

  3. lucasgonze commented on Feb 11, 2025

    @lucasgonze
    Author

    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!

    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 >= 0

  4. shelbyc commented on Feb 12, 2025

    @shelbyc
    Contributor

    Hi @lucasgonze, as in ossf/malicious-packages#799, GHSA-688c-gxc8-6xqp has been changed to show 1.1.1 as 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-core namespace, please reach out to https://www.npmjs.com/support.

    Thanks for your patience and have a great week!

  5. lucasgonze commented on Feb 12, 2025

    @lucasgonze
    Author

    Hi @lucasgonze, as in ossf/malicious-packages#799, GHSA-688c-gxc8-6xqp has been changed to show 1.1.1 as 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-core namespace, please reach out to https://www.npmjs.com/support.

    Thanks for your patience and have a great week!

    Thank you for this timely resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions