CVE-2022-26661: Trytond Improper Restriction Of XML External Vulnerability

MODERATE
Advisory Identifier: GHSA-cj78-rgw3-4h5p
CVSS 6.5
CWE-611
Published
Advisory Summary

CVE-2022-26661 is a MODERATE (CVSS 6.5) improper restriction of xml external vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Trytond libraries in the PyPI ecosystem. The issue involves improper restriction of xml external entity reference 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-26661 at a Glance

CVE Identifier CVE-2022-26661
GHSA Identifier GHSA-cj78-rgw3-4h5p
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Trytond
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:H/I:N/A:N).

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

How to Fix CVE-2022-26661

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-26661, 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. 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 XXE 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 authenticated user can make the server parse a crafted XML SEPA file to access arbitrary files on the system.

CVE-2022-26661 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-26661?
CVE-2022-26661 is a security vulnerability in Trytond involving Improper Restriction of XML External Entity Reference in trytond and proteus under CWE-611: Improper Restriction of XML External Entity Reference.
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-26661?
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-26661?
CVE-2022-26661 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-26661?
CVE-2022-26661 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check PyPI dependencies for CVE-2022-26661?
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-cj78-rgw3-4h5p",
  "modified" : "2022-03-28T15:56:00Z",
  "published" : "2022-03-11T00:02:02Z",
  "aliases" : [ "CVE-2022-26661" ],
  "summary" : "Improper Restriction of XML External Entity Reference in trytond and proteus",
  "details" : "An XXE 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 authenticated user can make the server parse a crafted XML SEPA file to access arbitrary files on the system.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "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-26661"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.tryton.org/t/security-release-for-issue11219-and-issue11244/5059"
  }, {
    "type" : "WEB",
    "url" : "https://foss.heptapod.net/tryton/tryton/-/issues/11219"
  }, {
    "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-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-28T15:56:00Z",
    "nvd_published_at" : "2022-03-10T17:47:00Z"
  }
}