RubySec

Providing security resources for the Ruby community

CVE-2021-31671 (pgsync): Connection security vulnerability with schema sync

ADVISORIES

GEM

pgsync

SEVERITY

CVSS v3.x: 7.5 (High)

PATCHED VERSIONS

  • >= 0.6.7

DESCRIPTION

pgsync drops connection parameters when syncing the schema with the –schema-first and –schema-only options. Some of these parameters may affect security. For instance, if sslmode is dropped, the connection may not use SSL. The first connection parameter is not affected.

pgsync drops connection parameters when syncing the schema with the --schema-first and --schema-only options. Some of these parameters may affect security. For instance, if sslmode is dropped, the connection may not use SSL. The first connection parameter is not affected.

An example where sslmode is dropped (connect_timeout is not affected):

from: postgres://user:pass@host/dbname?connect_timeout=10&sslmode=require

This applies to both the to and from connections.