CVE-2023-29401
published medium CVSS 3.1 · 4.3Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| github.com/gin-gonic/gin | — | github.com/gin-gonic/gin1.3.1-0.20190301021747-ccb9e902956d to < 1.9.1 · Other versions: unaffected | Affected | Not stated | Go |
Description
The filename parameter of the Context.FileAttachment function is not properly sanitized. A maliciously crafted filename can cause the Content-Disposition header to be sent with an unexpected filename value or otherwise modify the Content-Disposition header. For example, a filename of "setup.bat";x=.txt" will be sent as a file named "setup.bat". If the FileAttachment function is called with names provided by an untrusted source, this may permit an attacker to cause a file to be served with a name different than provided. Maliciously crafted attachment file name can modify the Content-Disposition header.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.3 / 10
- Severity
- medium
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| github.com/gin-gonic/gin | github.com/gin-gonic/gin | 1.3.1-0.20190301021747-ccb9e902956d to < 1.9.1 (affected · semver)Default: unaffected | Go · cna |
Weaknesses
1- CWE 20: Improper Input Validation
References
4Provider assertions
3Go · cna
Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 3ce9821bd37ff36d8e8aacbc1fcdd9c970391b7e0a793ff6ffbd1ac41dc3c2d2
- Ingested
- 23 Sep 2026, 08:07:56 UTC
- Source record
- Official CVE record