# CVE-2023-29401: golang-github-gin-gonic-gin: The filename parameter of the Context.FileAttachment function is not properly sanitized

CVE-2023-29401 is fixed in golang-github-gin-gonic-gin on 1 platform, first by DEBIAN-CVE-2023-29401, released June 8, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2023-29401
- Priority: Routine
- CVSS: 4.3 (medium)
- EPSS: 0.0048
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jun 8, 2023

## 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&quot;;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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | golang-github-gin-gonic-gin Debian 13.5 (trixie) | 1.8.1-3 | [DEBIAN-CVE-2023-29401](https://patchblox.com/security/data/fix/linux/debian-cve-2023-29401.md) | Jun 8, 2023 |
| Linux | golang-github-gin-gonic-gin Debian 14 | 1.8.1-3 | [DEBIAN-CVE-2023-29401](https://patchblox.com/security/data/fix/linux/debian-cve-2023-29401.md) | Jun 8, 2023 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
