{"id":"CVE-2023-29401","aliases":["CVE-2023-29401","GHSA-2c4m-59x9-fr2g","GO-2023-1737"],"related":[],"kind":"vulnerability","state":"published","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"}],"published":"2023-05-11T18:59:56.000Z","modified":"2026-06-17T05:49:58.100Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-494"],"affected":[{"ranges":[{"type":"semver","introduced":"1.3.1-0.20190301021747-ccb9e902956d","fixed":"1.9.1","status":"affected"}],"vendor":"github.com/gin-gonic/gin","product":"github.com/gin-gonic/gin","package":"github.com/gin-gonic/gin","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.3.1-0.20190301021747-ccb9e902956d","status":"affected","fixed":"1.9.1"}],"ecosystem":"Go","package":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.3.1-0.20190301021747-ccb9e902956d","status":"affected","fixed":"1.9.1"}],"ecosystem":"Go","package":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","source":"go"},{"ranges":[{"status":"affected","introduced":"1.3.1-0.20190301021747-ccb9e902956d","fixed":"1.9.1"}],"vendor":"gin-gonic","product":"gin","cpe":"cpe:2.3:a:gin-gonic:gin:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gin-gonic/gin/issues/3555","tags":["exploit","issue-tracking","report","web","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gin-gonic/gin/pull/3556","tags":["fix","issue-tracking","patch","web","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","tags":["release-notes","web","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://pkg.go.dev/vuln/GO-2023-1737","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gin-gonic/gin","tags":["package"],"sources":["ghsa"]}],"credits":["motoyasu-saburi"],"assigner":"Go","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-01-06T19:29:16.540Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-29401","url":"https://www.cve.org/CVERecord?id=CVE-2023-29401","licence":"CVE Terms of Use","modified":"2025-01-06T19:30:14.833Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2c4m-59x9-fr2g","url":"https://github.com/advisories/GHSA-2c4m-59x9-fr2g","licence":"CC-BY-4.0","modified":"2023-11-08T04:12:18.674Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-1737","url":"https://pkg.go.dev/vuln/GO-2023-1737","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-29401","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401","licence":"Public domain","modified":"2026-06-17T05:49:58.100Z"}],"updatedAt":"2026-11-25T22:58:24.687Z","epss":{"score":0.00482,"percentile":0.43181,"date":"2026-12-01T12:00:22.000Z"}}