{"id":"CVE-2023-29401","published":"2023-06-08T20:27:15Z","modified":"2025-01-06T19:30:14Z","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","vendor":"github.com/gin-gonic/gin","product":"github.com/gin-gonic/gin","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00482,"percentile":0.42453,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/gin-gonic/gin/issues/3555","tags":[]},{"url":"https://github.com/gin-gonic/gin/pull/3556","tags":[]},{"url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2023-1737","tags":[]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":8.49},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.01}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-05-20","earliestUrl":"https://github.com/dannyEndorTest/gin-vulnerable","repos":[{"name":"dannyEndorTest/gin-vulnerable","url":"https://github.com/dannyEndorTest/gin-vulnerable","stars":0,"created":"2026-05-20"}]},"first":{"date":"2026-05-20","source":"PoC-in-GitHub","url":"https://github.com/dannyEndorTest/gin-vulnerable"},"provenance":"source"},"vendorSlug":"github-com-gin-gonic-gin","affectedVersions":[{"vendor":"github.com/gin-gonic/gin","product":"github.com/gin-gonic/gin","versions":[">= 1.3.1-0.20190301021747-ccb9e902956d, < 1.9.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-01-06T19:29:16.540610Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/gin-gonic/gin","vulnerableRanges":[">=1.3.1-0.20190301021747-ccb9e902956d, <1.9.1"],"patched":["1.9.1"],"from":["GHSA-2c4m-59x9-fr2g","GO-2023-1737"],"provenance":"source"}],"summary":{"text":"The filename parameter of the Context.FileAttachment function in github.com/gin-gonic/gin is not properly sanitized, so the Content-Disposition HTTP header it generates can be altered by a crafted name. An attacker can cause a file to be served under a different name than the one supplied (for example, \"setup.bat\";x=.txt being delivered as \"setup.bat\") when FileAttachment is called with names from an untrusted source, and this requires a user to interact with the request over the network without authentication.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:59:14Z"},"euvd":{"id":"EUVD-2023-1445","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-36567","published":"2022-12-27","fixed":"1.6.0","kev":false},{"cve":"CVE-2020-28483","published":"2021-01-20","fixed":"1.7.7","kev":false},{"cve":"CVE-2023-26125","published":"2023-05-04","fixed":"1.9.0","kev":false,"link":{"from":"CVE-2023-26125","to":"CVE-2023-29401","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gin-gonic/gin","fromFixed":"1.9.0","toFixed":"1.9.1","daysApart":35}]}},{"cve":"CVE-2023-29401","published":"2023-06-08","fixed":"1.9.1","kev":false}],"package":"Go:github.com/gin-gonic/gin"}}