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

