CVE-2026-33221: Github.com/nhost/nhost Nhost Storage Affected By MIME Vulnerability

LOW
Advisory Identifier: GHSA-g9f6-9775-hffm
CVSS 5.3
CWE-434 CWE-345 CWE-343
Published
Advisory Summary

CVE-2026-33221 is a LOW (CVSS 5.3) nhost storage affected by mime vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Github.com/nhost/nhost libraries in the Go ecosystem. The issue involves nhost storage affected by mime type spoofing via trusted client content-type header in storage upload. Remediation is available by upgrading affected packages to version 0.0.0-20260318074820-c4bd53f042d7.

CVE-2026-33221 at a Glance

CVE Identifier CVE-2026-33221
GHSA Identifier GHSA-g9f6-9775-hffm
Severity LOW
CVSS v3.1 Base Score 5.3
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Github.com/nhost/nhost
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-33221

To remediate this vulnerability, upgrade all affected Github.com/nhost/nhost dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/nhost/nhost fixed: 0.0.0-20260318074820-c4bd53f042d7
Upgrade github.com/nhost/nhost to 0.0.0-20260318074820-c4bd53f042d7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/nhost/nhost

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33221, inspect your project dependencies for Github.com/nhost/nhost:

inspect dependencies for github.com/nhost/nhost

Analyze the terminal output to locate any version of Github.com/nhost/nhost in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260318074820-c4bd53f042d7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Github.com/nhost/nhost, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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: ```go 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. ## Suggested Fix Always detect MIME type from file content using `mimetype.DetectReader`, ignoring the client-provided `Content-Type` header entirely.

CVE-2026-33221 Affected Github.com/nhost/nhost Versions

1 component(s)
Fixed Versions:
0.0.0-20260318074820-c4bd53f042d7
Product / Package Ecosystem Affected Versions Fixed Version
github.com/nhost/nhost
Go
< 0.0.0-20260318074820-c4bd53f042d7
0.0.0-20260318074820-c4bd53f042d7

References

Frequently Asked Questions

What is CVE-2026-33221?
CVE-2026-33221 is a security vulnerability in Github.com/nhost/nhost involving Nhost Storage Affected by MIME Type Spoofing via Trusted Client Content-Type Header in Storage Upload under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Github.com/nhost/nhost versions are affected?
Affected versions include releases prior to 0.0.0-20260318074820-c4bd53f042d7 across affected packages: github.com/nhost/nhost.
What version fixes CVE-2026-33221?
Upgrading to 0.0.0-20260318074820-c4bd53f042d7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/nhost/nhost affected?
Yes, github.com/nhost/nhost is affected in releases prior to 0.0.0-20260318074820-c4bd53f042d7. Upgrade your dependency to 0.0.0-20260318074820-c4bd53f042d7 or later.
What is the CVSS score of CVE-2026-33221?
CVE-2026-33221 has a CVSS v3.1 base score of 5.3 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-33221?
CVE-2026-33221 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check Go dependencies for CVE-2026-33221?
Run the dependency tree command: 'inspect dependencies for github.com/nhost/nhost'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g9f6-9775-hffm",
  "modified" : "2026-06-09T11:52:21Z",
  "published" : "2026-03-18T20:21:37Z",
  "aliases" : [ "CVE-2026-33221" ],
  "summary" : "Nhost Storage Affected by MIME Type Spoofing via Trusted Client Content-Type Header in Storage Upload",
  "details" : "## Summary\n\nThe 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.\n\n## Affected Component\n\n- **Service**: `services/storage`\n- **File**: `services/storage/controller/upload_files.go`\n- **Function**: `getMultipartFile` (lines 48-70)\n\n## Root Cause\n\nIn `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:\n\n```go\ncontentType := file.header.Header.Get(\"Content-Type\")\nif contentType != \"\" && contentType != \"application/octet-stream\" {\n    return fileContent, contentType, nil // skip detection entirely\n}\n\n// mimetype.DetectReader only reached if client sends no Content-Type\n// or sends application/octet-stream\nmt, err := mimetype.DetectReader(fileContent)\n```\n\n## Impact\n\n**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.\n\n## Suggested Fix\n\nAlways detect MIME type from file content using `mimetype.DetectReader`, ignoring the client-provided `Content-Type` header entirely.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nhost/nhost"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260318074820-c4bd53f042d7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/security/advisories/GHSA-g9f6-9775-hffm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33221"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/pull/4018"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/commit/c4bd53f042d7f568e567e18e2665af81660fce85"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nhost/nhost"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/releases/tag/storage%400.12.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhost/nhost/releases/tag/storage@0.12.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-343", "CWE-345", "CWE-434" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-18T20:21:37Z",
    "nvd_published_at" : "2026-03-20T23:16:46Z"
  }
}