CVE-2022-39199: Github.com/codenotary/immudb Lack Of Proper Validation Of Vulnerability

MODERATE
Advisory Identifier: GHSA-6cqj-6969-p57x
CVSS 5.8
CWE-345
Published
Advisory Summary

CVE-2022-39199 is a MODERATE (CVSS 5.8) lack of proper validation of vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Github.com/codenotary/immudb libraries in the Go ecosystem. The issue involves lack of proper validation of server uuid can be used by the server to trick the client to accept invalid proofs. Remediation is available by upgrading affected packages to version 1.4.1.

CVE-2022-39199 at a Glance

CVE Identifier CVE-2022-39199
GHSA Identifier GHSA-6cqj-6969-p57x
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Github.com/codenotary/immudb
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.8

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

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

How to Fix CVE-2022-39199

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

github.com/codenotary/immudb fixed: 1.4.1
Upgrade github.com/codenotary/immudb to 1.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:

inspect dependencies for github.com/codenotary/immudb

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39199, inspect your project dependencies for Github.com/codenotary/immudb:

inspect dependencies for github.com/codenotary/immudb

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Github.com/codenotary/immudb, 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 immudb client SDKs use server's UUID to distinguish between different server instance so that the client can connect to different immudb instances and keep the state for multiple servers. SDK does not validate this uuid and can accept any value reported by the server. A malicious server can change the reported UUID tricking the client to treat it as a different server thus accepting a state completely irrelevant to the one previously retrieved from the server. ### Patches The following Go SDK versions are not vulnerable: | **SDK** | **Version** | |-------|------------| | [go](pkg.go.dev/github.com/codenotary/immudb/pkg/client) | 1.4.1 | ### Workarounds When initializing an immudb client object, a custom state handler can be used to store the state. Providing custom implementation that ignores the server UUID can be used to ensure that even if the server changes the UUID, client will still consider it to be the same server. ### For more information If you have any questions or comments about this advisory: * Open a discussion in [immudb Discussions](https://github.com/codenotary/immudb/discussions/new) * Email us at [immudb-security@codenotary.com](mailto:immudb-security@codenotary.com)

CVE-2022-39199 Affected Github.com/codenotary/immudb Versions

1 component(s)
Fixed Versions:
1.4.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/codenotary/immudb
Go
< 1.4.1
1.4.1

References

Frequently Asked Questions

What is CVE-2022-39199?
CVE-2022-39199 is a security vulnerability in Github.com/codenotary/immudb involving Lack of proper validation of server UUID can be used by the server to trick the client to accept invalid proofs under CWE-345: Insufficient Verification of Data Authenticity.
Which Github.com/codenotary/immudb versions are affected?
Affected versions include releases prior to 1.4.1 across affected packages: github.com/codenotary/immudb.
What version fixes CVE-2022-39199?
Upgrading to 1.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/codenotary/immudb affected?
Yes, github.com/codenotary/immudb is affected in releases prior to 1.4.1. Upgrade your dependency to 1.4.1 or later.
What is the CVSS score of CVE-2022-39199?
CVE-2022-39199 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2022-39199?
CVE-2022-39199 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check Go dependencies for CVE-2022-39199?
Run the dependency tree command: 'inspect dependencies for github.com/codenotary/immudb'. 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-6cqj-6969-p57x",
  "modified" : "2022-11-28T16:16:29Z",
  "published" : "2022-11-21T20:38:51Z",
  "aliases" : [ "CVE-2022-39199" ],
  "summary" : "Lack of proper validation of server UUID can be used by the server to trick the client to accept invalid proofs",
  "details" : "### Impact\n\nimmudb client SDKs use server's UUID to distinguish between different server instance so that the client can connect to different immudb instances and keep the state for multiple servers. SDK does not validate this uuid and can accept any value reported by the server. A malicious server can change the reported UUID tricking the client to treat it as a different server thus accepting a state completely irrelevant to the one previously retrieved from the server.\n\n### Patches\n\nThe following Go SDK versions are not vulnerable:\n\n| **SDK** | **Version** |\n|-------|------------|\n| [go](pkg.go.dev/github.com/codenotary/immudb/pkg/client) | 1.4.1 |\n\n### Workarounds\n\nWhen initializing an immudb client object, a custom state handler can be used to store the state. Providing custom implementation that ignores the server UUID can be used to ensure that even if the server changes the UUID, client will still consider it to be the same server.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open a discussion in [immudb Discussions](https://github.com/codenotary/immudb/discussions/new)\n* Email us at [immudb-security@codenotary.com](mailto:immudb-security@codenotary.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/codenotary/immudb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codenotary/immudb/security/advisories/GHSA-6cqj-6969-p57x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39199"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codenotary/immudb/commit/cade04756ff3f0a3b9e8d24149062744574adf5d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codenotary/immudb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codenotary/immudb/releases/tag/v1.4.1"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-1118"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-21T20:38:51Z",
    "nvd_published_at" : "2022-11-22T20:15:00Z"
  }
}