CVE-2026-16615
Received Received - Intake

Predictable PKCE Code Verifier in librest

Vulnerability report for CVE-2026-16615, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-22

Last updated on: 2026-07-22

Assigner: Red Hat, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-22
Last Modified
2026-07-22
Generated
2026-07-22
AI Q&A
2026-07-22
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
librest librest *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-338 The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is in the librest library's PKCE implementation for OAuth authorization. It uses a cryptographically insecure pseudo-random number generator (GRand from GLib) to create a code verifier. The lack of sufficient randomness allows attackers to predict or reconstruct the code verifier by reverse-engineering the PRNG seed, bypassing PKCE protections and impersonating clients during OAuth 2.0 flows.

Impact Analysis

An attacker could exploit this to bypass authentication in OAuth 2.0 flows, impersonate legitimate users or applications, and gain unauthorized access to protected resources. This could lead to data breaches, account takeovers, or unauthorized actions performed on behalf of users.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating confidentiality requirements in GDPR and HIPAA. Organizations using affected librest versions may fail to meet security and privacy controls, risking non-compliance and potential regulatory penalties.

Mitigation Strategies

Update librest to the latest patched version to replace the insecure GRand function with a cryptographically secure PRNG. If an update is unavailable, disable PKCE in OAuth flows or restrict OAuth authorization to trusted networks only.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-16615. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart