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.
Published: 2026-07-22
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw is in librest’s PKCE implementation for OAuth 2.0, where the code verifier is created using GLib’s GRand pseudo‑random number generator. This PRNG does not provide sufficient cryptographic entropy, allowing a malicious actor to determine or reconstruct the code verifier by reverse‑engineering the seed. An attacker who can predict the verifier can satisfy the PKCE challenge, effectively bypassing the protection and impersonating the client during the OAuth flow, thereby obtaining unauthorized access to protected resources that trust the OAuth exchange.

Affected Systems

The affected product is GNOME:librest, which is included in Red Hat Enterprise Linux 10. The advisory only lists this product, and any system that employs librest to perform OAuth 2.0 authorization and PKCE is at risk.

Risk and Exploitability

The CVSS score of 6.8 indicates moderate severity. The EPSS score of < 1 % shows a very low probability of exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is likely remote; an adversary can initiate an OAuth authorization request against a server that uses librest, then reconstruct the code verifier to receive a stolen access token. The weakness arises from deterministic PRNG usage, so the exploit does not require local access or privileged execution, making remote exploitation possible when the client software is deployed in a vulnerable environment.

Generated by OpenCVE AI on August 3, 2026 at 23:29 UTC.

Remediation

Vendor Workaround

Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.


OpenCVE Recommended Actions

  • Install the updated librest package provided by Red Hat as soon as it becomes available.
  • If updates cannot be applied immediately, consider replacing librest with an alternative OAuth library that implements PKCE with a secure random number generator, or reconfigure the client application to disable PKCE usage until the patch is released.
  • Keep monitoring Red Hat security advisories and the GNOME librest issue tracker for additional fixes or workarounds.

Generated by OpenCVE AI on August 3, 2026 at 23:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Gnome
Gnome librest
Vendors & Products Gnome
Gnome librest

Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.2
References

Wed, 22 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 22 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
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.
Title Librest: weak random number generation in pkce implementation
First Time appeared Redhat
Redhat enterprise Linux
Weaknesses CWE-338
CPEs cpe:/o:redhat:enterprise_linux:10
Vendors & Products Redhat
Redhat enterprise Linux
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N'}


Subscriptions

Gnome Librest
Redhat Enterprise Linux
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-07-31T13:58:32.910Z

Reserved: 2026-07-22T14:38:37.901Z

Link: CVE-2026-16615

cve-icon Vulnrichment

Updated: 2026-07-22T16:43:31.917Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-22T17:16:55.863

Modified: 2026-07-31T14:16:47.483

Link: CVE-2026-16615

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T23:30:17Z

Weaknesses
  • CWE-338

    Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)