Summary
The storage service's file upload handler trusts the client-provided Content-Type header without performing server-side MIME type detection. This allows an attacker to upload files with an arbitrary MIME type, bypassing any MIME-type-based restrictions configured on storage buckets.
Affected Component
- Service:
services/storage - File:
services/storage/controller/upload_files.go - Function:
getMultipartFile(lines 48-70)
Root Cause
In getMultipartFile, if the client provides a non-empty Content-Type header that isn't application/octet-stream, the function returns it as-is without performing content-based detection:
contentType := file.header.Header.Get("Content-Type")
if contentType != "" && contentType != "application/octet-stream" {
return fileContent, contentType, nil // skip detection entirely
}
// mimetype.DetectReader only reached if client sends no Content-Type
// or sends application/octet-stream
mt, err := mimetype.DetectReader(fileContent)
Impact
Incorrect MIME type in file metadata. The MIME type stored in file metadata reflects what the client claims rather than what the file actually contains. Any system consuming this metadata (browsers, CDNs, applications) may handle the file incorrectly based on the spoofed type.
The application accepts file uploads without adequately restricting the file type or content. Typical impact: remote code execution if the uploaded file can be served and executed on the server.
CVE-2026-33221 has a CVSS score of 5.3 (Low). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260318074820-c4bd53f042d7); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Always detect MIME type from file content using mimetype.DetectReader, ignoring the client-provided Content-Type header entirely.
Frequently Asked Questions
- What is CVE-2026-33221? CVE-2026-33221 is a low-severity unrestricted upload of dangerous file types vulnerability in github.com/nhost/nhost (go), affecting versions < 0.0.0-20260318074820-c4bd53f042d7. It is fixed in 0.0.0-20260318074820-c4bd53f042d7. The application accepts file uploads without adequately restricting the file type or content.
- How severe is CVE-2026-33221? CVE-2026-33221 has a CVSS score of 5.3 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/nhost/nhost are affected by CVE-2026-33221? github.com/nhost/nhost (go) versions < 0.0.0-20260318074820-c4bd53f042d7 is affected.
- Is there a fix for CVE-2026-33221? Yes. CVE-2026-33221 is fixed in 0.0.0-20260318074820-c4bd53f042d7. Upgrade to this version or later.
- Is CVE-2026-33221 exploitable, and should I be worried? Whether CVE-2026-33221 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-33221 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-33221? Upgrade
github.com/nhost/nhostto 0.0.0-20260318074820-c4bd53f042d7 or later.