4.4medium
Denial of Service (DoS)
- Severity
- 4.4medium CVSS:3.1 by snyk
- Exploit likelihood
- 1.89% (higher than 80% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-fqh4-rh59-xhvfSNYK-GOLANG-GITHUBCOMPIRESGOPROXYPROTO-1081577
Description
The package github.com/pires/go-proxyproto before 0.5.0 are vulnerable to Denial of Service (DoS) via the parseVersion1() function. The reader in this package is a default bufio.Reader wrapping a net.Conn. It will read from the connection until it finds a newline. Since no limits are implemented in the code, a deliberately malformed V1 header could be used to exhaust memory in a server process using this code - and create a DoS. This can be exploited by sending a stream starting with PROXY and continuing to send data (which does not contain a newline) until the target stops acknowledging. The risk here is small, because only trusted sources should be allowed to send proxy protocol headers.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/pires/go-proxyproto | from unspecified before 0.5.0 | CVE List |
| github.com/pires/go-proxyproto (Go) | before 0.5.0 | GitHub Advisory Database |
| go-proxyproto_project go-proxyproto | before 0.5.0 | NVD |
| fedoraproject fedora | 33, 34 | NVD |
All scores
| snyk | 4.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:N/I:N/A:P |
Classification
What each source says
CVE List
The package github.com/pires/go-proxyproto before 0.5.0 are vulnerable to Denial of Service (DoS) via the parseVersion1() function. The reader in this package is a default bufio.Reader wrapping a net.Conn. It will read from the connection until it finds a newline. Since no limits are implemented in the code, a deliberately malformed V1 header could be used to exhaust memory in a server process using this code - and create a DoS. This can be exploited by sending a stream starting with PROXY and continuing to send data (which does not contain a newline) until the target stops acknowledging. The risk here is small, because only trusted sources should be allowed to send proxy protocol headers.
GitHub Advisory Database
The package github.com/pires/go-proxyproto before 0.5.0 are vulnerable to Denial of Service (DoS) via the parseVersion1() function. The reader in this package is a default bufio.Reader wrapping a net.Conn. It will read from the connection until it finds a newline. Since no limits are implemented in the code, a deliberately malformed V1 header could be used to exhaust memory in a server process using this code - and create a DoS. This can be exploited by sending a stream starting with PROXY and continuing to send data (which does not contain a newline) until the target stops acknowledging. The risk here is small, because only trusted sources should be allowed to send proxy protocol headers.
NVD (es)
El paquete github.com/pires/go-proxyproto versiones anteriores a 0.5.0, son vulnerables a una Denegación de Servicio (DoS) por medio de la función parseVersion1(). El lector de este paquete es un bufio.Reader predeterminado que contiene un net.Conn. Leerá desde la conexión hasta que encuentre una nueva línea. Dado que no se implementan límites en el código, un encabezado V1 deliberadamente malformado podría ser usado para agotar la memoria en un proceso de servidor usando este código y crear una DoS. Esto puede ser explotado mediante el envió de una secuencia que comience con PROXY y continúe enviando datos (que no contienen una nueva línea) hasta que el objetivo deje de reconocer. El riesgo aquí es pequeño, porque solo las fuentes confiables deben poder enviar encabezados de protocolo proxy
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-23351 changed 2024-09-17 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fqh4-rh59-xhvf changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-23351 changed 2026-06-17 | Public domain |