CVE-2022-36111: Github.com/codenotary/immudb Insufficient Verification Of Proofs Generated Vulnerability
MODERATECVE-2022-36111 is a MODERATE (CVSS 5.4) insufficient verification of proofs generated vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Github.com/codenotary/immudb libraries in the Go ecosystem. The issue involves insufficient verification of proofs generated by the immudb server in client sdk.. Remediation is available by upgrading affected packages to version 1.4.1.
CVE-2022-36111 at a Glance
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:H/UI:R/S:C/C:N/I:H/A:N).
How to Fix CVE-2022-36111
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.
Upgrade github.com/codenotary/immudb to 1.4.1
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-36111, 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
CVE-2022-36111 Affected Github.com/codenotary/immudb Versions
1 component(s)| 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-36111?
Which Github.com/codenotary/immudb versions are affected?
What version fixes CVE-2022-36111?
Is github.com/codenotary/immudb affected?
What is the CVSS score of CVE-2022-36111?
What CWE is associated with CVE-2022-36111?
How can I check Go dependencies for CVE-2022-36111?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-672p-m5jq-mrh8",
"modified" : "2024-05-20T21:34:49Z",
"published" : "2022-11-21T20:38:39Z",
"aliases" : [ "CVE-2022-36111" ],
"summary" : "Insufficient Verification of Proofs generated by the immudb server in client SDK.",
"details" : "### Impact\n\nIn certain scenario a malicious immudb server can provide a falsified proof that will be accepted by the client SDK signing a falsified transaction replacing the genuine one. This situation can not be triggered by a genuine immudb server and requires the client to perform a specific list of verified operations resulting in acceptance of an invalid state value.\n\nThis vulnerability only affects immudb client SDKs, the immudb server itself is not affected by this vulnerability.\n\n### Detailed description\n\nimmudb uses Merkle Tree enhanced with additional linear part to perform consistency proofs between two transactions. The linear part is built from the last leaf node of the Merkle Tree compensating for transactions that were not yet consumed by the Merkle Tree calculation.\n\nThe Merkle Tree part is then used to perform proofs for things that are in transaction range covered by the Merkle Tree where the linear part is used to check those that are not yet in the Merkle Tree.\n\nWhen doing consistency checks between two immudb states, the linear proof part is not fully checked. In fact only the first (last Merkle Tree leaf) and the last (current DB state value) are checked against new Merkle Tree without ensuring that elements in the middle of that chain are correctly added as Merkle Tree leafs.\n\nThis lack of check means that the database can present different set of hashes on the linear proof part to what would later be used once those become part of the Merkle Tree. This property can be exploited by the database to expose two different transaction entries depending on the other transaction that the user requested consistency proof for.\n\nIn practice this could lead to a following scenario:\n\n* a client requests a verified write operation\n* the server responds with a proof for the transaction\n* client stores the state value retrieved from the server and expects it to be a confirmation of that write and all the history of the database before that transaction\n* a series of validated read / write operations is performed by the client, each accompanied by a successfully validated consistency proof and update of the client state\n* the client requests verified get operation on the transaction it has written before (and that was verified with a proof from the server)\n* the server replies with a completely different transaction that can be properly validated according to the currently stored db state on the client side\n\n### Patches\n\nThe following Go SDK versions is 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\nInvalid proofs can not be generated in a normal immudb server and will be detected by a genuine replica server.\nTo ensure that the server does not produce invalid proofs and to check that the history presented by the server\ndoes not contain falsified transactions, one should run a genuine immudb replica server in a safe environment\nand fully synchronize all databases with the primary.\n\n### References\n\n* https://github.com/codenotary/immudb/tree/master/docs/security/vulnerabilities/linear-fake\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:R/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-672p-m5jq-mrh8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36111"
}, {
"type" : "WEB",
"url" : "https://github.com/codenotary/immudb/commit/7267d67e28be8f0257b71d734611a051593e8a81"
}, {
"type" : "WEB",
"url" : "https://github.com/codenotary/immudb/commit/acf7f1b3d62436ea5e038acea1fc6394f90ab1c6"
}, {
"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://github.com/codenotary/immudb/tree/master/docs/security/vulnerabilities/linear-fake"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/github.com/codenotary/immudb/pkg/client"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-1117"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-345" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-21T20:38:39Z",
"nvd_published_at" : "2022-11-23T18:15:00Z"
}
}