CVE-2021-31671: Pgsync Contains Cleartext Transmission of Sensitive Information
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.40502%
CWE
Published
4/27/2021
Updated
8/25/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
pgsync | rubygems | < 0.6.7 | 0.6.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper handling of connection parameters when using --schema-first/--schema-only options. The commit diff shows critical changes in command construction in schema_sync.rb. Previously, connection URLs were appended directly to command strings ("-d #{@source.url}"), which can lose URL parameters during shell command parsing. The patched version改用array-based command construction to preserve all parameters. The dump_command and restore_command methods were directly responsible for this insecure parameter handling in vulnerable versions.