GHSA-8wgc-jjvv-cv6v: Loopback Improper Authorization Vulnerability

HIGH
CWE-285
Published
Advisory Summary

GHSA-8wgc-jjvv-cv6v is a HIGH improper authorization vulnerability (CWE-285: Improper Authorization) affecting Loopback libraries in the npm ecosystem. The issue involves improper authorization in loopback. Remediation is available by upgrading affected packages to version 2.40.0, 3.22.0.

GHSA-8wgc-jjvv-cv6v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8wgc-jjvv-cv6v
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product Loopback
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-8wgc-jjvv-cv6v

To remediate this vulnerability, upgrade all affected Loopback dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

loopback fixed: 2.40.0
npm install loopback@2.40.0
loopback fixed: 3.22.0
npm install loopback@3.22.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls loopback

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-8wgc-jjvv-cv6v, inspect your project dependencies using npm:

npm ls loopback

Analyze the terminal output to locate any version of Loopback in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.40.0), your application is affected.

Note: The npm ls loopback command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Loopback, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Vulnerable versions of `loopback` may allow attackers to create Authentication Tokens on behalf of other users due to Improper Authorization. If the AccessToken model is publicly exposed, an attacker can create Authorization Tokens for any user as long as they know the target's `userId`. This will allow the attacker to access the user's data and their privileges. ## Recommendation For loopback 2.x, upgrade to version 2.40.0 or later For loopback 3.x, upgrade to version 3.22.0 or later

GHSA-8wgc-jjvv-cv6v Affected Loopback Versions

2 component(s)
Fixed Versions:
2.40.03.22.0
Product / Package Ecosystem Affected Versions Fixed Version
loopback
npm
< 2.40.0
2.40.0
loopback
npm
≥ 3.0.0
< 3.22.0
3.22.0

References

Frequently Asked Questions

What is GHSA-8wgc-jjvv-cv6v?
GHSA-8wgc-jjvv-cv6v is a security vulnerability in Loopback involving Improper Authorization in loopback under CWE-285: Improper Authorization.
Which Loopback versions are affected?
Affected versions include releases prior to 2.40.0, 3.22.0 across affected packages: loopback.
What version fixes GHSA-8wgc-jjvv-cv6v?
Upgrading to 2.40.0, 3.22.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is loopback affected?
Yes, loopback is affected in releases prior to 2.40.0, 3.22.0. Upgrade your dependency to 2.40.0, 3.22.0 or later.
What CWE is associated with GHSA-8wgc-jjvv-cv6v?
GHSA-8wgc-jjvv-cv6v is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for GHSA-8wgc-jjvv-cv6v?
Run the dependency tree command: 'npm ls loopback'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8wgc-jjvv-cv6v",
  "modified" : "2021-09-27T15:44:08Z",
  "published" : "2020-09-02T15:54:52Z",
  "aliases" : [ ],
  "summary" : "Improper Authorization in loopback",
  "details" : "Vulnerable versions of `loopback` may allow attackers to create Authentication Tokens on behalf of other users due to Improper Authorization. If the AccessToken model is publicly exposed, an attacker can create Authorization Tokens for any user as long as they know the target's `userId`. This will allow the attacker to access the user's data and their privileges.\n\n\n## Recommendation\n\nFor loopback 2.x, upgrade to version 2.40.0 or later\nFor loopback 3.x, upgrade to version 3.22.0 or later",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "loopback"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.40.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.39.2"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "loopback"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.22.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.21.0"
    }
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/strongloop/loopback"
  }, {
    "type" : "WEB",
    "url" : "https://loopback.io/doc/en/lb2/Security-advisory-08-08-2018.html]"
  }, {
    "type" : "WEB",
    "url" : "https://loopback.io/doc/en/lb3/Security-advisory-08-08-2018.html]"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/771"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:35:10Z",
    "nvd_published_at" : null
  }
}