CVE-2021-23351: Denial of Service in github.com/pires/go-proxyproto

Summary

18/05/2021
Yes i
Moderate
4.9

CVE-2021-23351: github.com/pires/go-proxyproto denial of service vulnerability. Affects github.com/pires/go-proxyproto versions < 0.5.0. Fixed in 0.5.0. How to fix ↓

Also tracked for

The same CVE-2021-23351 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package github.com/pires/go-proxyproto is a Go library that provides support for the Proxy Protocol, which allows a client to send information about the original connection to a proxy server. This package is commonly used in server applications that need to handle proxy connections. However, versions before 0.5.0 are vulnerable to a Denial of Service (DoS) attack.

Vulnerability Detail

The vulnerability in github.com/pires/go-proxyproto lies in the parseVersion1() function. The package uses a default bufio.Reader to read from the connection until it finds a newline character. However, no limits are implemented in the code, which means that a deliberately malformed V1 header could be used to exhaust memory in a server process using this code, leading to a DoS. An attacker can exploit this vulnerability by sending a stream starting with 'PROXY' and continuing to send data without a newline character until the target stops acknowledging. It's important to note that this vulnerability can only be exploited by trusted sources that are allowed to send proxy protocol headers.

How To Fix

Latest published version: v0.16.0 as of 22 Oct 2026

go get github.com/pires/go-proxyproto@v0.16.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.5.0

This is the first release that contains the fix.

go get github.com/pires/go-proxyproto@v0.5.0

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

Workaround

There is no known workaround for this vulnerability. It is recommended to update the package to the latest version as soon as possible.

Conclusion

The vulnerability in github.com/pires/go-proxyproto can lead to a Denial of Service (DoS) attack if exploited by a trusted source. To mitigate this risk, it is crucial to update the package to version 0.5.0 or later. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for github.com/pires/go-proxyproto →

Share this vulnerability

FAQ

The impact of this vulnerability is a Denial of Service (DoS) attack, which can result in the unavailability of the affected server. However, the risk is relatively small as only trusted sources are allowed to send proxy protocol headers.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Gopkg.lock file and the playground will analyze it for any open-source vulnerabilities, including this one.

There are no known public exploits for this vulnerability at the time of writing. However, it is still important to update the package to the latest version to prevent any potential attacks.

Unfortunately, there is no known workaround for this vulnerability. The best way to mitigate the risk is to update the package to the latest version, which includes a fix for the DoS vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/pires/go-proxyproto.

How To Fix

Latest published version: v0.16.0 as of 22 Oct 2026

go get github.com/pires/go-proxyproto@v0.16.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.5.0

This is the first release that contains the fix.

go get github.com/pires/go-proxyproto@v0.5.0

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