CVE catalog

CVE-2022-41725

golang-1.19: CVE-2022-41725

[CVE catalog]

Severity
High · CVSS 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
1.24% · Oct 25, 2026

A denial of service is possible from excessive resource consumption in net/http and mime/multipart. Multipart form parsing with mime/multipart.Reader.ReadForm can consume largely unlimited amounts of memory and disk files. This also affects form parsing in the net/http package with the Request methods FormFile, FormValue, ParseMultipartForm, and PostFormValue. ReadForm takes a maxMemory parameter, and is documented as storing "up to maxMemory bytes +10MB (reserved for non-file parts) in memory". File parts which cannot be stored in memory are stored on disk in temporary files. The unconfigurable 10MB reserved for non-file parts is excessively large and can potentially open a denial of service vector on its own. However, ReadForm did not properly account for all memory consumed by a parsed form, such as map entry overhead, part names, and MIME headers, permitting a maliciously crafted form to consume well over 10MB. In addition, ReadForm contained no limit on the number of disk files created, permitting a relatively small request body to create a large number of disk temporary files. With fix, ReadForm now properly accounts for various forms of memory overhead, and should now stay within its documented limit of 10MB + maxMemory bytes of memory consumption. Users should still be aware that this limit is high and may still be hazardous. In addition, ReadForm now creates at most one on-disk temporary file, combining multiple form parts into a single temporary file. The mime/multipart.File interface type's documentation states, "If stored on disk, the File's underlying concrete type will be an *os.File.". This is no longer the case when a form contains more than one file part, due to this coalescing of parts into a single file. The previous behavior of using distinct files for each form part may be reenabled with the environment variable GODEBUG=multipartfiles=distinct. Users should be aware that multipart.ReadForm and the http.Request methods that call it do not limit the amount of disk consumed by temporary files. Callers can limit the size of form data with http.MaxBytesReader.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiangolang-1.19bookworm1.19.8-2fixed
Ubuntugolang-1.1014.041.10.4-2ubuntu1~14.04.1vulnerable
Ubuntugolang-1.18pro1.18.1-1ubuntu1~18.04.3vulnerable
Ubuntugolang-1.18pro1.18.1-1ubuntu1~18.04.4vulnerable
Ubuntugolang-1.18pro1.18.1-1ubuntu1~18.04.4+esm1fixed
Ubuntugolang-1.1016.041.10.4-2ubuntu1~16.04.1vulnerable
Ubuntugolang-1.1016.041.10.4-2ubuntu1~16.04.2vulnerable
Ubuntugolang-1.616.041.6-0ubuntu1vulnerable
Ubuntugolang-1.616.041.6-0ubuntu2vulnerable
Ubuntugolang-1.616.041.6-0ubuntu3vulnerable
Ubuntugolang-1.616.041.6-0ubuntu4vulnerable
Ubuntugolang-1.616.041.6-0ubuntu5vulnerable
Ubuntugolang-1.616.041.6.1-0ubuntu1vulnerable
Ubuntugolang-1.616.041.6.2-0ubuntu5~16.04vulnerable
Ubuntugolang-1.616.041.6.2-0ubuntu5~16.04.2vulnerable
Ubuntugolang-1.616.041.6.2-0ubuntu5~16.04.3vulnerable
Ubuntugolang-1.616.041.6.2-0ubuntu5~16.04.4vulnerable
Ubuntugolang-1.13pro1.13.8-1ubuntu2vulnerable
Ubuntugolang-1.13pro1.13.8-1ubuntu2.22.04.1vulnerable
Ubuntugolang-1.13pro1.13.8-1ubuntu2.22.04.1+esm1vulnerable
Ubuntugolang-1.13pro1.13.8-1ubuntu2.22.04.2vulnerable
Ubuntugolang-1.1018.041.10~rc1-1vulnerable
Ubuntugolang-1.1018.041.10~rc1-1ubuntu1vulnerable
Ubuntugolang-1.1018.041.10~rc1-2ubuntu1vulnerable
Ubuntugolang-1.1018.041.10~rc2-1ubuntu1vulnerable
Ubuntugolang-1.1018.041.10-1ubuntu1vulnerable
Ubuntugolang-1.1018.041.10.1-1ubuntu2vulnerable
Ubuntugolang-1.1018.041.10.4-2ubuntu1~18.04.1vulnerable
Ubuntugolang-1.1018.041.10.4-2ubuntu1~18.04.2vulnerable
Ubuntugolang-1.16pro1.16.2-0ubuntu1~20.04vulnerable
Ubuntugolang-1.16pro1.16.2-0ubuntu1~20.04.1vulnerable
Ubuntugolang-1.16pro1.16.2-0ubuntu1~20.04.1+esm1vulnerable
Ubuntugolang-1.818.041.8.3-2ubuntu1vulnerable
Ubuntugolang-1.818.041.8.3-2ubuntu1.18.04.1vulnerable
Ubuntugolang-1.918.041.9.1-2ubuntu1vulnerable
Ubuntugolang-1.918.041.9.2-1ubuntu1vulnerable
Ubuntugolang-1.918.041.9.2-3ubuntu1vulnerable
Ubuntugolang-1.918.041.9.3-1ubuntu1vulnerable
Ubuntugolang-1.918.041.9.4-1ubuntu1vulnerable
Ubuntugolang-1.1820.041.18.1-1ubuntu1~20.04.1vulnerable
Ubuntugolang-1.1820.041.18.1-1ubuntu1~20.04.2vulnerable
Ubuntugolang-1.1820.041.18.1-1ubuntu1~20.04.3fixed
Ubuntugolang-1.1320.041.13.1-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.3-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.4-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.5-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.6-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.6-2ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.7-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.8-1ubuntu1vulnerable
Ubuntugolang-1.1320.041.13.8-1ubuntu1.1vulnerable
Ubuntugolang-1.1320.041.13.8-1ubuntu1.2vulnerable
Ubuntugolang-1.1420.041.14~beta1-1vulnerable
Ubuntugolang-1.1420.041.14~beta1-2vulnerable
Ubuntugolang-1.1420.041.14~rc1-1vulnerable
Ubuntugolang-1.1420.041.14-1vulnerable
Ubuntugolang-1.1420.041.14.1-1vulnerable
Ubuntugolang-1.1420.041.14.2-1vulnerable
Ubuntugolang-1.1420.041.14.2-1ubuntu1vulnerable
Ubuntugolang-1.1420.041.14.3-2ubuntu2~20.04.1vulnerable
Ubuntugolang-1.1420.041.14.3-2ubuntu2~20.04.2vulnerable
Ubuntugolang-1.1722.041.17-1ubuntu2vulnerable
Ubuntugolang-1.1722.041.17.3-1ubuntu1vulnerable
Ubuntugolang-1.1722.041.17.3-1ubuntu2vulnerable
Ubuntugolang-1.1722.041.17.13-3ubuntu1vulnerable
Ubuntugolang-1.1722.041.17.13-3ubuntu1.2vulnerable
Ubuntugolang-1.1722.041.17.13-3ubuntu1.3fixed
Ubuntugolang-1.1822.041.18~beta1-0ubuntu1vulnerable
Ubuntugolang-1.1822.041.18~beta2-1ubuntu1vulnerable
Ubuntugolang-1.1822.041.18~beta2-1ubuntu2vulnerable
Ubuntugolang-1.1822.041.18~rc1-1ubuntu1vulnerable
Ubuntugolang-1.1822.041.18-1ubuntu1vulnerable
Ubuntugolang-1.1822.041.18.1-1ubuntu1vulnerable
Ubuntugolang-1.1822.041.18.1-1ubuntu1.1vulnerable
Ubuntugolang-1.1822.041.18.1-1ubuntu1.2fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiangolang-1.19sourcebookworm1.19.6-2not yet assignedNot reportedNot reported
Ubuntugolang-1.18debpro1.18.1-1ubuntu1~18.04.4+esm1Not reportedUBUNTU-CVE-2022-41725Not reported
Ubuntugolang-1.18deb20.041.18.1-1ubuntu1~20.04.3Not reportedUBUNTU-CVE-2022-41725Not reported
Ubuntugolang-1.17deb22.041.17.13-3ubuntu1.3Not reportedUBUNTU-CVE-2022-41725Not reported
Ubuntugolang-1.18deb22.041.18.1-1ubuntu1.2Not reportedUBUNTU-CVE-2022-41725Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Details (2)
    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

  • Source package: [golang-1.19]

    Details (2)
    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

  • Source package: [golang-1.19]

    Details (2)
    • 1.19.8-2 · amd64 · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

    • 1.19.8-2 · arm64 · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

  • Source package: [golang-1.19]

    Details (2)
    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

    • 1.19.8-2 · all · bookworm

      Fixed · Fixed: 1.19.6-2

      dsa · golang-1.19 · debian · bookworm

Observed:

References