// For flags

CVE-2023-45290

Memory exhaustion in multipart form parsing in net/textproto and net/http

Severity Score

6.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

When parsing a multipart form (either explicitly with Request.ParseMultipartForm or implicitly with Request.FormValue, Request.PostFormValue, or Request.FormFile), limits on the total size of the parsed form were not applied to the memory consumed while reading a single form line. This permits a maliciously crafted input containing very long lines to cause allocation of arbitrarily large amounts of memory, potentially leading to memory exhaustion. With fix, the ParseMultipartForm function now correctly limits the maximum size of form lines.

Al analizar un formulario de varias partes (ya sea explícitamente con Request.ParseMultipartForm o implícitamente con Request.FormValue, Request.PostFormValue o Request.FormFile), no se aplicaron límites en el tamaño total del formulario analizado a la memoria consumida al leer un solo formulario línea. Esto permite que una entrada creada con fines malintencionados que contenga líneas muy largas provoque la asignación de cantidades de memoria arbitrariamente grandes, lo que podría provocar un agotamiento de la memoria. Con la corrección, la función ParseMultipartForm ahora limita correctamente el tamaño máximo de las líneas del formulario.

A flaw was discovered in Go's net/http standard library package. When parsing a multipart form (either explicitly with Request.ParseMultipartForm or implicitly with Request.FormValue, Request.PostFormValue, or Request.FormFile), limits on the total size of the parsed form were not applied to the memory consumed while reading a single form line. This permits a maliciously crafted input containing very long lines to cause allocation of arbitrarily large amounts of memory, potentially leading to memory exhaustion. With fix, the ParseMultipartForm function now correctly limits the maximum size of form lines.

*Credits: Bartek Nowotarski
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2023-10-06 CVE Reserved
  • 2024-03-05 CVE Published
  • 2024-05-02 EPSS Updated
  • 2024-11-07 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-20: Improper Input Validation
  • CWE-770: Allocation of Resources Without Limits or Throttling
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Go Standard Library
Search vendor "Go Standard Library"
Net/textproto
Search vendor "Go Standard Library" for product "Net/textproto"
< 1.21.8
Search vendor "Go Standard Library" for product "Net/textproto" and version " < 1.21.8"
en
Affected
Go Standard Library
Search vendor "Go Standard Library"
Net/textproto
Search vendor "Go Standard Library" for product "Net/textproto"
>= 1.22.0-0 < 1.22.1
Search vendor "Go Standard Library" for product "Net/textproto" and version " >= 1.22.0-0 < 1.22.1"
en
Affected