# CVE-2023-1732: Improper random reading in CIRCL

> Failure to check random number generation errors in CIRCL can lead to predictable shared secrets and weak blinding, compromising cryptographic security.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 May 2023
- **Updated:** 27 Jan 2025
- **Also known as:** GHSA-2q89-485c-9j2x, GO-2023-1765

## What is CVE-2023-1732?

CVE-2023-1732 is a medium-severity vulnerability in Cloudflare CIRCL, published on 10 May 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

When sampling randomness for a shared secret, the implementation of Kyber and FrodoKEM, did not check whether crypto/rand.Read() returns an error. In rare deployment cases (error thrown by the Read() function), this could lead to a predictable shared secret.

The tkn20 and blindrsa components did not check whether enough randomness was returned from the user provided randomness source. Typically the user provides crypto/rand.Reader, which in the vast majority of cases will always return the right number random bytes. In the cases where it does not, or the user provides a source that does not, the blinding for blindrsa is weak and integrity of the plaintext is not ensured in tkn20.

Weakness: CWE-755 (Improper Handling of Exceptional Conditions), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2023-1732?

3 open source packages ship an affected version, including github.com/cloudflare/circl. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cloudflare/circl` | Go | All versions | 1.3.3 |
| `github.com/cloudflare/circl` | Go | All versions | 1.3.3 |
| `github.com/cloudflare/circl` | Go | All versions | 1.3.3 |

Products: Cloudflare Circl.

## How do I fix CVE-2023-1732?

Upgrade github.com/cloudflare/circl to 1.3.3 or later.

## Is CVE-2023-1732 being exploited?

There is no known exploitation of CVE-2023-1732 in the wild and no public exploit code.

## Other vulnerabilities in Cloudflare CIRCL

- [CVE-2026-1229](https://insights.sbomify.com/CVE-2026-1229/): Incorrect calculation in CIRCL secp384r1 CombinedMult (low 2.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-1732 and fix it if it is affected.

What it is: CVE-2023-1732 is a medium-severity vulnerability in Cloudflare CIRCL, published on 10 May 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-1732 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cloudflare/circl (Go): affected all versions; fixed in 1.3.3
- github.com/cloudflare/circl (Go): affected all versions; fixed in 1.3.3
- github.com/cloudflare/circl (Go): affected all versions; fixed in 1.3.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-1732/ (Markdown: https://insights.sbomify.com/CVE-2023-1732/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-1732
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-1732
- OSV: https://osv.dev/vulnerability/CVE-2023-1732

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-1732/
Summaries are generated and may contain mistakes; the official description above is the record.
