CVE-2021-3964: Elgg/elgg Elgg Is Vulnerable To Authorization Vulnerability

MODERATE
Advisory Identifier: GHSA-gwpx-q2h9-wxgx
CVSS 5.9
CWE-639
Published
Advisory Summary

CVE-2021-3964 is a MODERATE (CVSS 5.9) elgg is vulnerable to authorization vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Elgg/elgg libraries in the Packagist ecosystem. The issue involves elgg is vulnerable to authorization bypass through user-controlled key. Remediation is available by upgrading affected packages to version 3.3.22.

CVE-2021-3964 at a Glance

CVE Identifier CVE-2021-3964
GHSA Identifier GHSA-gwpx-q2h9-wxgx
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Elgg/elgg
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2021-3964

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

elgg/elgg fixed: 3.3.22
Upgrade elgg/elgg to 3.3.22
Verify Direct and Transitive Dependencies

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

inspect dependencies for elgg/elgg

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-3964, inspect your project dependencies for Elgg/elgg:

inspect dependencies for elgg/elgg

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Elgg/elgg, 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

elgg is vulnerable to Authorization Bypass Through User-Controlled Key

CVE-2021-3964 Affected Elgg/elgg Versions

1 component(s)
Fixed Versions:
3.3.22
Product / Package Ecosystem Affected Versions Fixed Version
elgg/elgg
Packagist
< 3.3.22
3.3.22

References

Frequently Asked Questions

What is CVE-2021-3964?
CVE-2021-3964 is a security vulnerability in Elgg/elgg involving elgg is vulnerable to Authorization Bypass Through User-Controlled Key under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Elgg/elgg versions are affected?
Affected versions include releases prior to 3.3.22 across affected packages: elgg/elgg.
What version fixes CVE-2021-3964?
Upgrading to 3.3.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elgg/elgg affected?
Yes, elgg/elgg is affected in releases prior to 3.3.22. Upgrade your dependency to 3.3.22 or later.
What is the CVSS score of CVE-2021-3964?
CVE-2021-3964 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2021-3964?
CVE-2021-3964 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Packagist dependencies for CVE-2021-3964?
Run the dependency tree command: 'inspect dependencies for elgg/elgg'. 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-gwpx-q2h9-wxgx",
  "modified" : "2021-12-03T15:16:06Z",
  "published" : "2021-12-03T20:43:25Z",
  "aliases" : [ "CVE-2021-3964" ],
  "summary" : "elgg is vulnerable to Authorization Bypass Through User-Controlled Key",
  "details" : "elgg is vulnerable to Authorization Bypass Through User-Controlled Key",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "elgg/elgg"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3964"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elgg/elgg/commit/d9fcad76ee380ea17edd61d13d0f87828ea3f744"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elgg/elgg"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/a4df45d6-b739-4299-967f-c960b569383a"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-12-02T21:20:04Z",
    "nvd_published_at" : "2021-12-01T12:15:00Z"
  }
}