CVE-2023-29401
Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin
- Published
- Updated
- Reserved
- Assigned by
- 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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By Go
- 2 months later
· 2 months later
Published
- 19 months later
· 19 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVDNVD · Modified | 3.1 | Medium4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.48% · top 58% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.3.
Weakness
- CWE 20: Improper Input Validation
- CWE-494 (opens in a new tab)All about CWE-494 and its CVEs
Affected products
github.com/gin-gonic/gin · github.com/gin-gonic/gin
- affected 1.3.1-0.20190301021747-ccb9e902956d – < 1.9.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/gin-gonic/ginGHSA-2c4m-59x9-fr2g (opens in a new tab)
References (4)
- https://github.com/gin-gonic/gin/issues/3555 (opens in a new tab)x_transferred
- https://github.com/gin-gonic/gin/pull/3556 (opens in a new tab)x_transferred
- https://github.com/gin-gonic/gin/releases/tag/v1.9.1 (opens in a new tab)x_transferred
- https://pkg.go.dev/vuln/GO-2023-1737 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-2c4m-59x9-fr2g (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2023-29401)Record last updated .