CVE-2023-29401: The filename parameter of the Context.FileAttachment function is not properly sanitized
CVE-2023-29401 is a medium-severity flaw (CVSS 4.3) affecting gin. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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 perm
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Risk facts
| CVSS score | 4.3 (Medium) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Required |
| EPSS exploit chance | 0.5% (top 59%) |
| CISA exploited list | No |
| Weakness | CWE-494 |
| Published | 2023-06-08 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2023-29401?
gin: upgrade to 1.9.1. Exact commands for each OS are on this page.
Is CVE-2023-29401 being exploited?
CVE-2023-29401 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2023-29401 affect?
CVE-2023-29401 affects gin. Severity is medium (CVSS 4.3). 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-Di
How urgent is CVE-2023-29401?
Priority 30/100. Public exploit reference
Related CVEs
- CVE-2023-31873 HIGH 7.8 DOWNGRADE Gin 0.7.4 allows execution of arbitrary code when a crafted file is opened, e.g., via require('child_process')
- CVE-2023-26125 MEDIUM 5.6 UPGRADE Versions of the package github.com/gin-gonic/gin before 1.9.0 are vulnerable to Improper Input Validation by a
- CVE-2020-36567 HIGH 7.5 UPGRADE Unsanitized input in the default logger in github.com/gin-gonic/gin before v1.6.0 allows remote attackers to i