GHSA-hjx6-f647-mvf9: Invenio communities Cross-Site Scripting Vulnerability

MODERATE
CVSS 6.3
CWE-79
Published
Advisory Summary

GHSA-hjx6-f647-mvf9 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Invenio communities libraries in the PyPI ecosystem. The issue involves invenio-communities has a cross-site scripting (xss) vulnerability in react components. Remediation is available by upgrading affected packages to version 7.8.0, 4.2.2, 2.8.11.

GHSA-hjx6-f647-mvf9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hjx6-f647-mvf9
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Invenio communities
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.3

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

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

How to Fix GHSA-hjx6-f647-mvf9

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

invenio-communities fixed: 7.8.0
pip install invenio-communities>=7.8.0
invenio-communities fixed: 4.2.2
pip install invenio-communities>=4.2.2
invenio-communities fixed: 2.8.11
pip install invenio-communities>=2.8.11
Verify Direct and Transitive Dependencies

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

pip show invenio-communities

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-hjx6-f647-mvf9, inspect your installed packages using pip:

pip show invenio-communities

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

Note: The pip show invenio-communities command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Invenio communities, 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

# Impact We have identified a Cross-Site Scripting (XSS) vulnerability within certain React components related to community members in the Invenio-Communities module. This vulnerability enables a user to inject a script tag into the Affiliations field during the account registration process. The malicious script is executed when the user creates a new community and is listed as a public member. The script is triggered whenever any user visits the Members section of any community that includes the compromised user. This can potentially allow the attacker to access personal information, such as cookies, of the visiting user. # Patches The problem has been patched in [v7.8.0](https://github.com/inveniosoftware/invenio-communities/releases/tag/v7.8.0). Patches also have been backported in versions [v4.2.2](https://github.com/inveniosoftware/invenio-communities/tree/v4.2.2) and [v2.8.11](https://github.com/inveniosoftware/invenio-communities/tree/v2.8.11). # Credits Thanks to [Twitter.com/AliGoodLuck11](https://x.com/AliGoodLuck11) for reporting the vulnerability with a detailed description on how to reproduce it! # For more information If you have any questions or comments about this advisory: Email us at [info@inveniosoftware.org](mailto:info@inveniosoftware.org)

GHSA-hjx6-f647-mvf9 Affected Invenio communities Versions

3 component(s)
Fixed Versions:
7.8.04.2.22.8.11
Product / Package Ecosystem Affected Versions Fixed Version
invenio-communities
PyPI
≥ 5.0.0
< 7.8.0
7.8.0
invenio-communities
PyPI
≥ 3.0.0
< 4.2.2
4.2.2
invenio-communities
PyPI
< 2.8.11
2.8.11

References

Frequently Asked Questions

What is GHSA-hjx6-f647-mvf9?
GHSA-hjx6-f647-mvf9 is a security vulnerability in Invenio communities involving Invenio-Communities has a Cross-Site Scripting (XSS) vulnerability in React components under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Invenio communities versions are affected?
Affected versions include releases prior to 7.8.0, 4.2.2, 2.8.11 across affected packages: invenio-communities.
What version fixes GHSA-hjx6-f647-mvf9?
Upgrading to 7.8.0, 4.2.2, 2.8.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is invenio-communities affected?
Yes, invenio-communities is affected in releases prior to 7.8.0, 4.2.2, 2.8.11. Upgrade your dependency to 7.8.0, 4.2.2, 2.8.11 or later.
What is the CVSS score of GHSA-hjx6-f647-mvf9?
GHSA-hjx6-f647-mvf9 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with GHSA-hjx6-f647-mvf9?
GHSA-hjx6-f647-mvf9 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for GHSA-hjx6-f647-mvf9?
Run the dependency tree command: 'pip show invenio-communities'. 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-hjx6-f647-mvf9",
  "modified" : "2024-06-12T19:43:04Z",
  "published" : "2024-06-12T19:43:04Z",
  "aliases" : [ ],
  "summary" : "Invenio-Communities has a Cross-Site Scripting (XSS) vulnerability in React components",
  "details" : "# Impact\n\nWe have identified a Cross-Site Scripting (XSS) vulnerability within certain React components related to community members in the Invenio-Communities module. This vulnerability enables a user to inject a script tag into the Affiliations field during the account registration process. The malicious script is executed when the user creates a new community and is listed as a public member.\n\nThe script is triggered whenever any user visits the Members section of any community that includes the compromised user. This can potentially allow the attacker to access personal information, such as cookies, of the visiting user.\n\n# Patches\nThe problem has been patched in [v7.8.0](https://github.com/inveniosoftware/invenio-communities/releases/tag/v7.8.0). Patches also have been backported in versions [v4.2.2](https://github.com/inveniosoftware/invenio-communities/tree/v4.2.2) and [v2.8.11](https://github.com/inveniosoftware/invenio-communities/tree/v2.8.11).\n\n# Credits\n\nThanks to [Twitter.com/AliGoodLuck11](https://x.com/AliGoodLuck11)  for reporting the vulnerability with a detailed description on how to reproduce it!\n\n# For more information\nIf you have any questions or comments about this advisory:\n\nEmail us at [info@inveniosoftware.org](mailto:info@inveniosoftware.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "invenio-communities"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "7.8.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "invenio-communities"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "4.2.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "invenio-communities"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.8.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/inveniosoftware/invenio-communities/security/advisories/GHSA-hjx6-f647-mvf9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/inveniosoftware/invenio-communities/commit/4424dd5112818992b82ae42d4c4f89089502b35f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/inveniosoftware/invenio-communities/commit/6a47db9404c51134634b3905f62f612b4a976698"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/inveniosoftware/invenio-communities/commit/817b8208f5ce262f45eab32832d90b80dc7d3fce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/inveniosoftware/invenio-communities/commit/b89442c9d57421a88dd0aa89a404ba89d1a22cac"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/inveniosoftware/invenio-communities"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-12T19:43:04Z",
    "nvd_published_at" : null
  }
}