CVE-2023-29401 | Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin

Exp

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.

Published: 2023-06-08 Last update: 2025-01-06 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-29401 is rated Exploit Available (54.1/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.43%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2023-29401

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2023-29401

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-23 0.54% 0.43% -0.11%
2 2026-05-22 0.38% 0.54% +0.16%
3 2026-01-17 0.38%

Full EPSS history (14 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-29401

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 [email protected]
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2023-29401

GitHub Security Advisory for CVE-2023-29401

GHSA-2c4m-59x9-fr2g · Severity: medium · Ecosystem: go — Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function

OS Trackers for CVE-2023-29401

vendor priority summary link
debian not yet assigned CVE-2023-29401 not yet assigned priority: Debian including 1 source packages (golang-github-gin-gonic-gin), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 3, open 2. https://security-tracker.debian.org/tracker/CVE-2023-29401
redhat medium https://access.redhat.com/security/cve/CVE-2023-29401
ubuntu low CVE-2023-29401 low priority: Ubuntu including 1 source packages (golang-github-gin-gonic-gin), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 7, needs-triage 6. https://ubuntu.com/security/CVE-2023-29401

Affected software / configurations for CVE-2023-29401

Vendor Product Version Raw CPE
gin-gonic gin >= 1.3.1-0.20190301021747-ccb9e902956d, < 1.9.1 cpe:2.3:a:gin-gonic:gin:*:*:*:*:*:*:*:*

References for CVE-2023-29401

cvelogic Threat Intelligence