Skip to content

Commit a6dd33a

Browse files
1 parent 7ebb5e7 commit a6dd33a

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

advisories/github-reviewed/2026/03/GHSA-4647-wpjq-hh7f/GHSA-4647-wpjq-hh7f.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-4647-wpjq-hh7f",
4-
"modified": "2026-03-18T20:22:11Z",
4+
"modified": "2026-03-25T18:15:24Z",
55
"published": "2026-03-18T20:22:11Z",
66
"aliases": [
77
"CVE-2026-33226"
@@ -40,6 +40,10 @@
4040
"type": "WEB",
4141
"url": "https://github.com/Budibase/budibase/security/advisories/GHSA-4647-wpjq-hh7f"
4242
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33226"
46+
},
4347
{
4448
"type": "PACKAGE",
4549
"url": "https://github.com/Budibase/budibase"
@@ -52,6 +56,6 @@
5256
"severity": "HIGH",
5357
"github_reviewed": true,
5458
"github_reviewed_at": "2026-03-18T20:22:11Z",
55-
"nvd_published_at": null
59+
"nvd_published_at": "2026-03-20T23:16:46Z"
5660
}
5761
}

advisories/github-reviewed/2026/03/GHSA-g9f6-9775-hffm/GHSA-g9f6-9775-hffm.json

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-g9f6-9775-hffm",
4-
"modified": "2026-03-18T20:21:37Z",
4+
"modified": "2026-03-25T18:15:09Z",
55
"published": "2026-03-18T20:21:37Z",
66
"aliases": [
77
"CVE-2026-33221"
88
],
99
"summary": "Nhost Storage Affected by MIME Type Spoofing via Trusted Client Content-Type Header in Storage Upload",
10-
"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.\n\n## References\n\n- CWE-345: Insufficient Verification of Data Authenticity\n- CWE-434: Unrestricted Upload of File with Dangerous Type",
10+
"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.",
1111
"severity": [
1212
{
13-
"type": "CVSS_V3",
14-
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:N"
13+
"type": "CVSS_V4",
14+
"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"
1515
}
1616
],
1717
"affected": [
@@ -40,23 +40,36 @@
4040
"type": "WEB",
4141
"url": "https://github.com/nhost/nhost/security/advisories/GHSA-g9f6-9775-hffm"
4242
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33221"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/nhost/nhost/pull/4018"
50+
},
4351
{
4452
"type": "WEB",
4553
"url": "https://github.com/nhost/nhost/commit/c4bd53f042d7f568e567e18e2665af81660fce85"
4654
},
4755
{
4856
"type": "PACKAGE",
4957
"url": "https://github.com/nhost/nhost"
58+
},
59+
{
60+
"type": "WEB",
61+
"url": "https://github.com/nhost/nhost/releases/tag/storage@0.12.0"
5062
}
5163
],
5264
"database_specific": {
5365
"cwe_ids": [
66+
"CWE-343",
5467
"CWE-345",
5568
"CWE-434"
5669
],
5770
"severity": "LOW",
5871
"github_reviewed": true,
5972
"github_reviewed_at": "2026-03-18T20:21:37Z",
60-
"nvd_published_at": null
73+
"nvd_published_at": "2026-03-20T23:16:46Z"
6174
}
6275
}

0 commit comments

Comments
 (0)