GHSA-2mg2-p7r7-g27f

Suggest an improvement
Source
https://github.com/advisories/GHSA-2mg2-p7r7-g27f
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-2mg2-p7r7-g27f/GHSA-2mg2-p7r7-g27f.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2mg2-p7r7-g27f
Aliases
Published
2026-07-06T21:06:45Z
Modified
2026-07-07T20:41:16Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Coder: Zip upload decompression lacks aggregate size limit, enabling denial of service
Details

Summary

POST /api/v2/files converts zip uploads to tar in memory via CreateTarFromZip, which enforced a per-entry size limit but no aggregate limit on total decompressed output, writing to an unbounded in-memory buffer.

Note: Exploitation requires authenticated file-upload access and the impact is limited to availability (denial of service).

Impact

An authenticated user could upload a zip within the 100 MiB upload limit but containing many highly compressible entries whose decompressed size exhausted memory, crashing coderd before any RBAC check. Repeated requests could keep the service unavailable. This is a denial of service; it does not allow data disclosure or code execution.

Patches

The fix adds a metadata preflight check that sums projected entry sizes and a streaming writer that enforces the aggregate limit during decompression.

The fix was backported to all supported release lines:

Release line Patched version
2.34 v2.34.2
2.33 v2.33.8
2.32 v2.32.7
2.29 (ESR) v2.29.17

Workarounds

Restrict file-upload permissions to trusted users or place a reverse proxy with request-body size limits in front of coderd.

Resources

  • Fix: #25877

Credits

Coder would like to thank Anthropic's Security Team (ANT-2026-22438) for independently disclosing this issue!

Database specific
{
    "cwe_ids": [
        "CWE-409",
        "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-06T21:06:45Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
}
References

Affected packages

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.34.0
Fixed
2.34.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-2mg2-p7r7-g27f/GHSA-2mg2-p7r7-g27f.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.33.0
Fixed
2.33.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-2mg2-p7r7-g27f/GHSA-2mg2-p7r7-g27f.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.30.0
Fixed
2.32.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-2mg2-p7r7-g27f/GHSA-2mg2-p7r7-g27f.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.17.0
Fixed
2.29.17

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-2mg2-p7r7-g27f/GHSA-2mg2-p7r7-g27f.json"