# CVE-2026-16615: Librest: weak random number generation in pkce implementation

> Weak random number generation in librest's PKCE implementation allows attackers to predict code verifiers and bypass OAuth protections.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 Jul 2026
- **Updated:** 1 Sep 2026
- **Also known as:** ALSA-2026:47085, AZL-93303, DEBIAN-CVE-2026-16615, GHSA-223h-642r-2f6v, MGASA-2026-0436, OESA-2026-3974, OESA-2026-3975, OESA-2026-3976, RHSA-2026:47085, RHSA-2026:62222, RLSA-2026:47085, SUSE-SU-2026:23564-1, SUSE-SU-2026:3795-1, SUSE-SU-2026:3796-1, SUSE-SU-2026:3834-1, UBUNTU-CVE-2026-16615, openSUSE-SU-2026:11477-1, openSUSE-SU-2026:21563-1, openSUSE-SU-2026:21694-1

## What is CVE-2026-16615?

CVE-2026-16615 is a medium-severity vulnerability in GNOME Red Hat Enterprise Linux 10, published on 22 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A flaw was found in librest. The PKCE implementation for OAuth authorization uses the GRand function from the GLib API, a cryptographically insecure pseudo-random number generator. Because the generated "code verifier" lacks sufficient cryptographic entropy, a malicious actor can reverse-engineer the pseudo-random number generator (PRNG) seed to predict or reconstruct the code verifier string, allowing an attacker to bypass PKCE protections and successfully impersonate the client during the OAuth 2.0 authorization flow.

Weakness: CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG))

## Which versions are affected by CVE-2026-16615?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rest` | AlmaLinux:10 | All versions | 0.9.1-11.el10_2.1 |
| `rest-devel` | AlmaLinux:10 | All versions | 0.9.1-11.el10_2.1 |
| `rest` | Red Hat:enterprise_linux:10.2 | All versions | 0:0.9.1-11.el10_2.1 |
| `rest-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:0.9.1-11.el10_2.1 |
| `rest-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:0.9.1-11.el10_2.1 |
| `rest-demo-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:0.9.1-11.el10_2.1 |
| `rest-devel` | Red Hat:enterprise_linux:10.2 | All versions | 0:0.9.1-11.el10_2.1 |
| `rest` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:0.9.1-11.el10_0.1 |
| `rest-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:0.9.1-11.el10_0.1 |
| `rest-debugsource` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:0.9.1-11.el10_0.1 |
| `rest-demo-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:0.9.1-11.el10_0.1 |
| `rest-devel` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:0.9.1-11.el10_0.1 |
| `rest` | Rocky Linux:10 | All versions | 0:0.9.1-11.el10_2.1 |
| `librest` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP7 | All versions | 0.9.1-150600.3.3.1 |
| `librest` | SUSE:Linux Enterprise Server 16.0 | All versions | 0.9.1-160000.3.1 |
| `librest` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 0.8.0-13.3.1 |
| `librest` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.9.1-160000.3.1 |
| `librest0_7` | SUSE:Linux Enterprise Workstation Extension 15 SP7 | All versions | 0.8.1-150600.4.3.1 |
| `librest` | openSUSE:Leap 16.0 | All versions | 0.9.1-160000.3.1 |
| `librest0_7` | openSUSE:Leap 16.0 | All versions | 0.8.1-bp160.2.1 |
| `librest` | openSUSE:Tumbleweed | All versions | 0.10.2-2.1 |

## How do I fix CVE-2026-16615?

Apply the vendor's patch.

## Is CVE-2026-16615 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-16615 and fix it if it is affected.

What it is: CVE-2026-16615 is a medium-severity vulnerability in GNOME Red Hat Enterprise Linux 10, published on 22 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-16615 in the wild and no public exploit code.

Affected product: GNOME Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2026-16615/ (Markdown: https://insights.sbomify.com/CVE-2026-16615/index.md)
```

## Sources

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

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