Impact
PostgreSQL’s pgcrypto module improperly handles encryption and decryption when OpenSSL is configured to disable certain ciphers. In that scenario, data encrypted with functions such as pgp_sym_encrypt or pgp_pub_encrypt is stored in the database without real encryption, and decrypting with an incorrect key still succeeds. This defeats the intended confidentiality and the modest protection offered by the modification detection code, allowing an attacker to recover cleartext just by reading the stored data. The weakness matches CWE‑313 (Plaintext Storage or Transmission) and CWE‑345 (Improper Verification of Cryptographic Claims).
Affected Systems
Affected are PostgreSQL releases earlier than 18.6, 17.11, 16.15, 15.19, and 14.24. The vulnerable functions are pgp_sym_encrypt, pgp_sym_decrypt, pgp_pub_encrypt, pgp_pub_decrypt, pgp_sym_encrypt_bytea, pgp_sym_decrypt_bytea, pgp_pub_encrypt_bytea, and pgp_pub_decrypt_bytea, all of which can be invoked by users with sufficient database permissions in any of those versions.
Risk and Exploitability
The CVSS score of 6.5 represents moderate to high risk, while the EPSS score of less than 1% indicates a very low but not zero probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. An attacker who can run the affected pgcrypto functions, such as a privileged database user or a compromised application, can retrieve plaintext data by invoking the encryption function and then decrypting the resulting value even with an incorrect key. Because the flaw resides in the database engine, the attack does not require network exposure beyond database access and can be executed with input that passes through pgcrypto functions.
OpenCVE Enrichment
Debian DLA
Debian DSA
Ubuntu USN