/

CVE-2026-74891

Severity:

CRITICAL RISK

(9.8)

Hardcoded Credentials (CWE-798) in openssl_encrypt Server

CVE-2026-74891

Analyzed

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Unauthorized Database Access and Sensitive Data Exposure

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

Versions of openssl_encrypt before 1.4.0 may include hardcoded PostgreSQL credentials in standalone server configuration files. An attacker who can reach an affected server over the same network may use these known credentials to access database contents and retrieve sensitive information.

Affected context

The vulnerability may occur in standalone openssl_encrypt server deployments that use configuration files containing hardcoded or default PostgreSQL credentials. Risk increases when the database is reachable from the same network as an attacker and when network controls, database authentication, or credential rotation do not provide additional protection.

Exploit preconditions

  • Attack surface: PostgreSQL database services associated with an affected standalone server deployment
  • Required access: Network connectivity to the database and knowledge of the embedded or default credentials
  • Trigger point: Authentication to the PostgreSQL service using those credentials
  • Why exploitation is possible: Credentials embedded in configuration files are predictable, reusable, and may remain valid across deployments

Why this happens

The underlying issue is the inclusion of usable database credentials directly in standalone server configuration files.

This maps to CWE-798: Use of Hard-coded Credentials, where authentication secrets are embedded in application code or deployment artifacts rather than supplied through a protected, deployment-specific secret-management mechanism.

Because the credentials may be shared, predictable, and difficult to rotate independently, an attacker who obtains or infers them may authenticate to the associated database.

Potential impact

  • Unauthorized access to PostgreSQL databases
  • Exposure of sensitive application or customer data
  • Modification or deletion of database records
  • Credential reuse against other systems
  • Further compromise of applications that trust the affected database

General mitigation guidance

Mitigation generally focuses on removing embedded credentials and reducing database exposure.

Common defensive patterns include:

  • Supplying unique, deployment-specific secrets through a protected secret-management system
  • Rotating credentials and invalidating shared or default accounts
  • Restricting database network access to required application hosts
  • Applying least-privilege database roles and separating read and write permissions
  • Avoiding storage of secrets in source code, packaged configuration, or publicly accessible artifacts
  • Enforcing secure-by-default database authentication and encrypted connections where appropriate
  • Monitoring and limiting access to configuration files and secret providers

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis and secret-scanning rules for database usernames, passwords, and connection strings
  • Code and configuration reviews that identify embedded credentials or default authentication settings
  • Repository and artifact scans covering source files, container images, packages, and deployment manifests
  • Database logs showing unexpected authentication attempts or access from unauthorized network segments
  • Policy enforcement that blocks hardcoded secrets and requires approved secret-management integrations
  • Automated security review tools that flag credential literals and overly broad database exposure

Sources

SourceLink
github.comgithub.com/jahlives/openssl_encrypt/security/advisories/GHSA-v4vm-4xf2-fhqj
vulncheck.comvulncheck.com/advisories/openssl-encrypt-before-hardcoded-database-credentials

Frequently asked

questions

It may be exploitable remotely from the same network when the associated PostgreSQL service is reachable and the embedded credentials remain valid.

The attacker generally needs network connectivity to the database service and knowledge of, or access to, the hardcoded credentials. Authentication or network segmentation may limit the effective scope.

Remove credentials from packaged configuration, use unique secrets supplied through an approved secret-management mechanism, rotate exposed credentials, and restrict database access by network and privilege.

Enforce secret-scanning and secure configuration policies in development and deployment pipelines, prohibit default credentials, apply least privilege, and continuously monitor database authentication activity.

Find out what's already
exploitable in your codebase.