CVE-2022-29161: Xwiki platform crypto Use Of A Broken Or Vulnerability

MODERATE
Advisory Identifier: GHSA-h8v5-p258-pqf4
CVSS 5.4
CWE-327 CWE-326
Published
Advisory Summary

CVE-2022-29161 is a MODERATE (CVSS 5.4) use of a broken or vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Xwiki platform crypto libraries in the Maven ecosystem. The issue involves use of a broken or risky cryptographic algorithm in xwiki crypto api. Remediation is available by upgrading affected packages to version 13.10.6, 14.3.1.

CVE-2022-29161 at a Glance

CVE Identifier CVE-2022-29161
GHSA Identifier GHSA-h8v5-p258-pqf4
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Xwiki platform crypto
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

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

How to Fix CVE-2022-29161

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

org.xwiki.platform:xwiki-platform-crypto fixed: 13.10.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-crypto</artifactId>
    <version>13.10.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-crypto fixed: 14.3.1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-crypto</artifactId>
    <version>14.3.1</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=org.xwiki.platform

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-29161, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.xwiki.platform

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

Note: The mvn dependency:tree -Dincludes=org.xwiki.platform command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Xwiki platform crypto, 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 XWiki Crypto API will generate X509 certificates signed by default using SHA1 with RSA, which is not considered safe anymore for use in certificate signatures, due to the risk of collisions with SHA1. Note that this API is never used in XWiki Standard but it might be used in some extensions of XWiki. ### Patches The problem has been patched in XWiki version 13.10.6, 14.3.1 and 14.4-rc-1. Since then, the Crypto API will generate X509 certificates signed by default using SHA256 with RSA. ### Workarounds Administrators are advised to upgrade their XWiki installation to one of the patched versions. If the upgrade is not possible, it is possible to patch the module xwiki-platform-crypto in a local installation by applying the change exposed in https://github.com/xwiki/xwiki-platform/commit/26728f3f23658288683667a5182a916c7ecefc52 and re-compiling the module. ### References https://jira.xwiki.org/browse/XWIKI-19676 https://github.com/openssl/openssl/blob/master/CHANGES.md?plain=1#L938 https://github.com/openssl/openssl/issues/16650 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Jira XWiki](https://jira.xwiki.org) * Email us at [security ML](mailto:security@xwiki.org)

CVE-2022-29161 Affected Xwiki platform crypto Versions

2 component(s)
Fixed Versions:
13.10.614.3.1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-crypto
Maven
< 13.10.6
13.10.6
org.xwiki.platform:xwiki-platform-crypto
Maven
≥ 14.0.0
< 14.3.1
14.3.1

References

Frequently Asked Questions

What is CVE-2022-29161?
CVE-2022-29161 is a security vulnerability in Xwiki platform crypto involving Use of a Broken or Risky Cryptographic Algorithm in XWiki Crypto API under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Xwiki platform crypto versions are affected?
Affected versions include releases prior to 13.10.6, 14.3.1 across affected packages: org.xwiki.platform:xwiki-platform-crypto.
What version fixes CVE-2022-29161?
Upgrading to 13.10.6, 14.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-crypto affected?
Yes, org.xwiki.platform:xwiki-platform-crypto is affected in releases prior to 13.10.6, 14.3.1. Upgrade your dependency to 13.10.6, 14.3.1 or later.
What is the CVSS score of CVE-2022-29161?
CVE-2022-29161 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2022-29161?
CVE-2022-29161 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Maven dependencies for CVE-2022-29161?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.platform'. 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-h8v5-p258-pqf4",
  "modified" : "2022-05-24T12:47:10Z",
  "published" : "2022-05-24T12:47:10Z",
  "aliases" : [ "CVE-2022-29161" ],
  "summary" : "Use of a Broken or Risky Cryptographic Algorithm in XWiki Crypto API",
  "details" : "### Impact\nXWiki Crypto API will generate X509 certificates signed by default using SHA1 with RSA, which is not considered safe anymore for use in certificate signatures, due to the risk of collisions with SHA1.\nNote that this API is never used in XWiki Standard but it might be used in some extensions of XWiki.\n\n### Patches\nThe problem has been patched in XWiki version 13.10.6, 14.3.1 and 14.4-rc-1. Since then, the Crypto API will generate X509 certificates signed by default using SHA256 with RSA.\n\n### Workarounds\nAdministrators are advised to upgrade their XWiki installation to one of the patched versions.\nIf the upgrade is not possible, it is possible to patch the module xwiki-platform-crypto in a local installation by applying the change exposed in https://github.com/xwiki/xwiki-platform/commit/26728f3f23658288683667a5182a916c7ecefc52 and re-compiling the module.\n\n### References\nhttps://jira.xwiki.org/browse/XWIKI-19676\nhttps://github.com/openssl/openssl/blob/master/CHANGES.md?plain=1#L938\nhttps://github.com/openssl/openssl/issues/16650\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki](https://jira.xwiki.org)\n* Email us at [security ML](mailto:security@xwiki.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-crypto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "13.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-crypto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "14.0.0"
      }, {
        "fixed" : "14.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-h8v5-p258-pqf4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29161"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/26728f3f23658288683667a5182a916c7ecefc52"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-19676"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326", "CWE-327" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-24T12:47:10Z",
    "nvd_published_at" : "2022-05-06T00:15:00Z"
  }
}