CVE-2023-31135: Github.com/dgraph io/dgraph Dgraph Audit Log Encryption Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-92wq-q9pq-gw47
CVSS 5.5
CWE-326
Published
Advisory Summary

CVE-2023-31135 is a MODERATE (CVSS 5.5) dgraph audit log encryption vulnerability vulnerability (CWE-326: Inadequate Encryption Strength) affecting Github.com/dgraph io/dgraph libraries in the Go ecosystem. The issue involves dgraph audit log encryption vulnerability. Remediation is available by upgrading affected packages to version 23.0.0.

CVE-2023-31135 at a Glance

CVE Identifier CVE-2023-31135
GHSA Identifier GHSA-92wq-q9pq-gw47
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-326: Inadequate Encryption Strength
Affected Product Github.com/dgraph io/dgraph
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

Attack Vector Local (AV:L)
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-2023-31135

To remediate this vulnerability, upgrade all affected Github.com/dgraph io/dgraph 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/dgraph-io/dgraph fixed: 23.0.0
Upgrade github.com/dgraph-io/dgraph to 23.0.0
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/dgraph-io/dgraph

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-31135, inspect your project dependencies for Github.com/dgraph io/dgraph:

inspect dependencies for github.com/dgraph-io/dgraph

Analyze the terminal output to locate any version of Github.com/dgraph io/dgraph in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 23.0.0), 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-326: Inadequate Encryption Strength, where the product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. In Github.com/dgraph io/dgraph, 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 Existing Dgraph audit logs are vulnerable to brute force attacks due to nonce collisions. All audit logs generated by versions of Dgraph <v23.0.0 are affected. ### Patches This issue was patched in https://github.com/dgraph-io/dgraph/pull/8323. Dgraph users should upgrade to v23.0.0. ### Workarounds Store existing audit logs in a secure location. For extra security, encrypt using a tool like `gpg`. ### References See https://github.com/dgraph-io/dgraph/pull/8323 for more context on the vulnerability.

CVE-2023-31135 Affected Github.com/dgraph io/dgraph Versions

1 component(s)
Fixed Versions:
23.0.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/dgraph-io/dgraph
Go
< 23.0.0
23.0.0

References

Frequently Asked Questions

What is CVE-2023-31135?
CVE-2023-31135 is a security vulnerability in Github.com/dgraph io/dgraph involving Dgraph Audit Log Encryption Vulnerability under CWE-326: Inadequate Encryption Strength.
Which Github.com/dgraph io/dgraph versions are affected?
Affected versions include releases prior to 23.0.0 across affected packages: github.com/dgraph-io/dgraph.
What version fixes CVE-2023-31135?
Upgrading to 23.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/dgraph-io/dgraph affected?
Yes, github.com/dgraph-io/dgraph is affected in releases prior to 23.0.0. Upgrade your dependency to 23.0.0 or later.
What is the CVSS score of CVE-2023-31135?
CVE-2023-31135 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-31135?
CVE-2023-31135 is classified under CWE-326: Inadequate Encryption Strength (The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.).
How can I check Go dependencies for CVE-2023-31135?
Run the dependency tree command: 'inspect dependencies for github.com/dgraph-io/dgraph'. 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-92wq-q9pq-gw47",
  "modified" : "2023-05-25T19:07:49Z",
  "published" : "2023-05-17T17:07:40Z",
  "aliases" : [ "CVE-2023-31135" ],
  "summary" : "Dgraph Audit Log Encryption Vulnerability",
  "details" : "### Impact\nExisting Dgraph audit logs are vulnerable to brute force attacks due to nonce collisions.  All audit logs generated by versions of Dgraph <v23.0.0 are affected.\n\n### Patches\nThis issue was patched in https://github.com/dgraph-io/dgraph/pull/8323.  Dgraph users should upgrade to v23.0.0.\n\n### Workarounds\nStore existing audit logs in a secure location.  For extra security, encrypt using a tool like `gpg`.\n\n### References\nSee https://github.com/dgraph-io/dgraph/pull/8323 for more context on the vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/dgraph-io/dgraph"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "23.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dgraph-io/dgraph/security/advisories/GHSA-92wq-q9pq-gw47"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-31135"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dgraph-io/dgraph/pull/8323"
  }, {
    "type" : "WEB",
    "url" : "https://en.wikipedia.org/wiki/Cryptographic_nonce"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dgraph-io/dgraph"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dgraph-io/dgraph/releases/tag/v23.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-17T17:07:40Z",
    "nvd_published_at" : "2023-05-17T18:15:09Z"
  }
}