CVE-2022-26662: Trytond XML Entity Expansion Vulnerability

HIGH
Advisory Identifier: GHSA-pm3h-mm62-pwm8
CVSS 7.5
CWE-776
Published
Advisory Summary

CVE-2022-26662 is a HIGH (CVSS 7.5) xml entity expansion vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Trytond libraries in the PyPI ecosystem. The issue involves xml entity expansion in trytond and proteus. Remediation is available by upgrading affected packages to version 5.0.46, 6.0.16, 6.2.6, 5.0.12, 6.0.5, 6.2.2.

CVE-2022-26662 at a Glance

CVE Identifier CVE-2022-26662
GHSA Identifier GHSA-pm3h-mm62-pwm8
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Trytond
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-26662

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

trytond fixed: 5.0.46
pip install trytond>=5.0.46
trytond fixed: 6.0.16
pip install trytond>=6.0.16
trytond fixed: 6.2.6
pip install trytond>=6.2.6
proteus fixed: 5.0.12
pip install proteus>=5.0.12
proteus fixed: 6.0.5
pip install proteus>=6.0.5
proteus fixed: 6.2.2
pip install proteus>=6.2.2
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 trytond

How to Check if You Are Affected

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

pip show trytond

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Trytond, 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

An XML Entity Expansion (XEE) issue was discovered in Tryton Application Platform (Server) 5.x through 5.0.45, 6.x through 6.0.15, and 6.1.x and 6.2.x through 6.2.5, and Tryton Application Platform (Command Line Client (proteus)) 5.x through 5.0.11, 6.x through 6.0.4, and 6.1.x and 6.2.x through 6.2.1. An unauthenticated user can send a crafted XML-RPC message to consume all the resources of the server.

CVE-2022-26662 Affected Trytond Versions

6 component(s)
Fixed Versions:
5.0.466.0.166.2.65.0.126.0.56.2.2
Product / Package Ecosystem Affected Versions Fixed Version
trytond
PyPI
≥ 5.0.0
< 5.0.46
5.0.46
trytond
PyPI
≥ 6.0.0
< 6.0.16
6.0.16
trytond
PyPI
≥ 6.1.0
< 6.2.6
6.2.6
proteus
PyPI
≥ 5.0.0
< 5.0.12
5.0.12
proteus
PyPI
≥ 6.0.0
< 6.0.5
6.0.5
proteus
PyPI
≥ 6.1.0
< 6.2.2
6.2.2

References

Frequently Asked Questions

What is CVE-2022-26662?
CVE-2022-26662 is a security vulnerability in Trytond involving XML Entity Expansion in trytond and proteus under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Trytond versions are affected?
Affected versions include releases prior to 5.0.46, 6.0.16, 6.2.6, 5.0.12, 6.0.5, 6.2.2 across affected packages: trytond, proteus.
What version fixes CVE-2022-26662?
Upgrading to 5.0.46, 6.0.16, 6.2.6, 5.0.12, 6.0.5, 6.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is trytond affected?
Yes, trytond is affected in releases prior to 5.0.46, 6.0.16, 6.2.6. Upgrade your dependency to 5.0.46, 6.0.16, 6.2.6 or later.
Is proteus affected?
Yes, proteus is affected in releases prior to 5.0.12, 6.0.5, 6.2.2. Upgrade your dependency to 5.0.12, 6.0.5, 6.2.2 or later.
What is the CVSS score of CVE-2022-26662?
CVE-2022-26662 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-26662?
CVE-2022-26662 is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') (The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.).
How can I check PyPI dependencies for CVE-2022-26662?
Run the dependency tree command: 'pip show trytond'. 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-pm3h-mm62-pwm8",
  "modified" : "2022-03-28T15:56:34Z",
  "published" : "2022-03-11T00:02:04Z",
  "aliases" : [ "CVE-2022-26662" ],
  "summary" : "XML Entity Expansion in trytond and proteus",
  "details" : "An XML Entity Expansion (XEE) issue was discovered in Tryton Application Platform (Server) 5.x through 5.0.45, 6.x through 6.0.15, and 6.1.x and 6.2.x through 6.2.5, and Tryton Application Platform (Command Line Client (proteus)) 5.x through 5.0.11, 6.x through 6.0.4, and 6.1.x and 6.2.x through 6.2.1. An unauthenticated user can send a crafted XML-RPC message to consume all the resources of the server.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "trytond"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.46"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "trytond"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "trytond"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.0"
      }, {
        "fixed" : "6.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "proteus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "proteus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "proteus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.0"
      }, {
        "fixed" : "6.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-26662"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.tryton.org/issue11244"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.tryton.org/t/security-release-for-issue11219-and-issue11244/5059"
  }, {
    "type" : "PACKAGE",
    "url" : "https://hg.tryton.org/trytond"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2022/03/msg00016.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2022/03/msg00017.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2022/dsa-5098"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2022/dsa-5099"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-776" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-28T15:54:14Z",
    "nvd_published_at" : "2022-03-10T17:47:00Z"
  }
}