CVE-2021-38599: Improper use of cryptographic key in wal-g

github.com/wal-g/wal-g Updated 02 Oct 2025

Summary

02/09/2021
Yes i
High
7.5

CVE-2021-38599: Improper use of cryptographic key in wal-g. Affects github.com/wal-g/wal-g versions < 1.1. Fixed in 1.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The wal-g package is a Go library that provides utilities for working with Write-Ahead Logs (WAL) in PostgreSQL databases. It offers features such as backup and restore functionality, compression, and encryption. The package is widely used in the Go ecosystem for managing PostgreSQL backups. However, versions prior to 1.1 of wal-g have a vulnerability that allows cleartext backups to be uploaded when a non-libsodium build is used, disregarding the libsodium encryption key. This violates the Principle of Least Surprise as users would expect all file activity to be encrypted.

Vulnerability Detail

The vulnerability in wal-g arises from improper use of the cryptographic key. When a non-libsodium build is used, the package fails to properly handle the encryption key and uploads backups in cleartext instead of encrypting them. This can lead to unauthorized access to sensitive data if the backups are intercepted or accessed by malicious actors. The vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

Minimum fixed version

1.1

This is the first release that contains the fix.

go get github.com/wal-g/wal-g@v1.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, users can mitigate the risk by ensuring that they are using a libsodium build of the wal-g package and by updating to version 1.1 or later.

Conclusion

The wal-g package prior to version 1.1 has a vulnerability that allows cleartext backups to be uploaded when a non-libsodium build is used. This can result in unauthorized access to sensitive data. To mitigate the risk, users should update to version 1.1 or later and ensure they are using a libsodium build. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for github.com/wal-g/wal-g →

Share this vulnerability

FAQ

wal-g is a Go library for working with Write-Ahead Logs (WAL) in PostgreSQL databases. It provides backup and restore functionality, compression, and encryption features.

The vulnerability allows cleartext backups to be uploaded when a non-libsodium build of wal-g is used, bypassing encryption. This can lead to unauthorized access to sensitive data.

To fix the vulnerability, update to version 1.1 or later of the wal-g package and ensure that you are using a libsodium build.

There is no specific workaround mentioned for this vulnerability. However, using a libsodium build and updating to version 1.1 or later can mitigate the risk.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

How To Fix

Minimum fixed version

1.1

This is the first release that contains the fix.

go get github.com/wal-g/wal-g@v1.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback