/

CVE-2026-74894

Severity:

CRITICAL RISK

(9.8)

Authentication Bypass (CWE-287) in openssl_encrypt API

CVE-2026-74894

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized administrative actions and cross-user key compromise

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical authentication bypass in openssl_encrypt allows the API to accept any non-empty Bearer token without verifying its validity. An attacker who can reach the affected API may upload arbitrary public keys, enumerate keys, and revoke keys belonging to other users.

Affected context

The issue occurs in deployments using openssl_encrypt before 1.4.0 when API requests are authenticated through the vulnerable verify_api_token function. It becomes risky where the affected key-management endpoints are network-accessible and rely on Bearer-token validation to protect key creation, listing, or revocation operations.

Exploit preconditions

  • Attack surface: API endpoints that manage public keys
  • Required access: Network access to the affected API; a valid account may not be required if the endpoint accepts any non-empty Bearer token
  • Trigger point: Processing the Authorization header during token verification
  • Why exploitation is possible: The authentication check confirms only that a Bearer token is present and non-empty, rather than validating its authenticity, ownership, scope, or expiration

Why this happens

The vulnerability results from an authentication function that treats the presence of a non-empty credential as proof of identity. This insecure validation pattern maps to CWE-287: Improper Authentication, because the application does not reliably establish that the requester is an authorized principal before allowing protected operations. As a result, authorization decisions can be made for an attacker-controlled or impersonated identity.

Potential impact

  • Attackers may bypass authentication for protected API operations
  • Arbitrary public keys could be uploaded
  • Keys belonging to users may be enumerated
  • An attacker could revoke keys owned by other users
  • Account access or service integrations may be disrupted
  • Key-management integrity and trust relationships could be compromised

General mitigation guidance

Mitigation focuses on making authentication cryptographically and operationally verifiable rather than presence-based.

Common defensive patterns include:

  • Validate Bearer tokens against a trusted issuer, signature, audience, subject, and expiration
  • Reject malformed, empty, expired, revoked, or incorrectly scoped credentials
  • Enforce authorization checks that bind every key operation to the authenticated owner or an explicitly permitted role
  • Apply least privilege to key-management identities and API capabilities
  • Use secure-by-default authentication middleware instead of endpoint-specific token checks
  • Rate-limit sensitive operations and require additional controls for bulk enumeration or revocation
  • Avoid exposing key-management endpoints publicly unless required by the deployment model

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis and code review searches for checks that test only token presence or string length
  • Review of authentication middleware and all protected endpoint authorization paths
  • Tests using invalid, expired, revoked, cross-tenant, and incorrectly scoped tokens
  • API gateway policies that require validated identity, issuer, audience, and scope claims
  • Audit monitoring for key enumeration, unexpected uploads, and bulk revocation activity
  • Automated security testing that verifies unauthorized requests cannot perform protected key operations

Sources

SourceLink
github.comgithub.com/jahlives/openssl_encrypt/security/advisories/GHSA-4g2c-wpgj-49w8
vulncheck.comvulncheck.com/advisories/openssl-encrypt-before-authentication-bypass-via-bearer-token

Frequently asked

questions

It may be remotely exploitable when the affected API is reachable by an attacker and accepts an Authorization header. The exact exposure depends on network access controls and endpoint deployment.

Not necessarily. The described flaw accepts any non-empty Bearer token, so a valid, properly issued token may not be required when the vulnerable endpoints are accessible.

Replace presence-based checks with centralized token verification that validates authenticity, lifetime, audience, identity, and permissions before each sensitive operation.

Use standard authentication middleware, enforce object-level authorization, test invalid and cross-user credentials, and monitor sensitive key-management activity.

Find out what's already
exploitable in your codebase.