Vulnerabilities in pkg:pypi/omero-figure

PACKAGE
Advisory Identifier: GHSA-g67g-hvc3-xmvf
Advisory Summary

CVE-2021-41132 is a CRITICAL (CVSS 9.8) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Omero web libraries in the PyPI ecosystem. The issue involves inconsistent input sanitisation leads to xss vectors. Remediation is available by upgrading affected packages to version 5.11.0, 4.4.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/omero-figure

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/omero-figure. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g67g-hvc3-xmvf CVE-2021-41132 CRITICAL Inconsistent input sanitisation leads to XSS vectors

CVE-2021-41132 at a Glance

CVE Identifier CVE-2021-41132
GHSA Identifier GHSA-g67g-hvc3-xmvf
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Omero web
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2021-41132

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

omero-web fixed: 5.11.0
pip install omero-web>=5.11.0
omero-figure fixed: 4.4.1
pip install omero-figure>=4.4.1
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 omero-web

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-41132, inspect your installed packages using pip:

pip show omero-web

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Omero web, 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

### Background A variety of templates do not perform proper sanitization through HTML escaping. Due to the lack of sanitization and use of ``jQuery.html()``, there are a whole host of XSS possibilities with specially crafted input to a variety of fields. ### Impact OMERO.web before 5.11.0 and OMERO.figure before 4.4.1. ### Patches Users should upgrade OMERO.web to 5.11.0 or higher and OMERO.figure to 4.4.1 or higher.

CVE-2021-41132 Affected Omero web Versions

2 component(s)
Fixed Versions:
5.11.04.4.1
Product / Package Ecosystem Affected Versions Fixed Version
omero-web
PyPI
< 5.11.0
5.11.0
omero-figure
PyPI
< 4.4.1
4.4.1

References

Frequently Asked Questions

What is CVE-2021-41132?
CVE-2021-41132 is a security vulnerability in Omero web involving Inconsistent input sanitisation leads to XSS vectors under CWE-116: Improper Encoding or Escaping of Output.
Which Omero web versions are affected?
Affected versions include releases prior to 5.11.0, 4.4.1 across affected packages: omero-web, omero-figure.
What version fixes CVE-2021-41132?
Upgrading to 5.11.0, 4.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is omero-web affected?
Yes, omero-web is affected in releases prior to 5.11.0. Upgrade your dependency to 5.11.0 or later.
Is omero-figure affected?
Yes, omero-figure is affected in releases prior to 4.4.1. Upgrade your dependency to 4.4.1 or later.
What is the CVSS score of CVE-2021-41132?
CVE-2021-41132 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-41132?
CVE-2021-41132 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check PyPI dependencies for CVE-2021-41132?
Run the dependency tree command: 'pip show omero-web'. 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-g67g-hvc3-xmvf",
  "modified" : "2024-10-08T12:42:26Z",
  "published" : "2021-10-14T21:19:23Z",
  "aliases" : [ "CVE-2021-41132" ],
  "summary" : "Inconsistent input sanitisation leads to XSS vectors",
  "details" : "### Background\n\nA variety of templates do not perform proper sanitization through HTML escaping.\nDue to the lack of sanitization and use of ``jQuery.html()``, there are a whole host of XSS possibilities with specially crafted input to a variety of fields.\n\n### Impact\n\nOMERO.web before 5.11.0 and OMERO.figure before 4.4.1.\n\n### Patches\nUsers should upgrade OMERO.web to 5.11.0 or higher and OMERO.figure to 4.4.1 or higher.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "omero-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.11.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "omero-figure"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ome/omero-web/security/advisories/GHSA-g67g-hvc3-xmvf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41132"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ome/omero-web/commit/0168067accde5e635341b3c714b1d53ae92ba424"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ome/omero-web"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/omero-figure/PYSEC-2021-379.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/omero-web/PYSEC-2021-372.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.openmicroscopy.org/security/advisories/2021-SV3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-79" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-14T18:50:58Z",
    "nvd_published_at" : "2021-10-14T16:15:00Z"
  }
}