{"id":"CVE-2023-29401","aliases":["DEBIAN-CVE-2023-29401","EUVD-2023-1445","GHSA-2c4m-59x9-fr2g","GO-2023-1737","UBUNTU-CVE-2023-29401"],"status":"published","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","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\u0026quot;;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.","severity":{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00482,"percentile":0.41831,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-494"],"published":"2023-05-11T18:59:56Z","modified":"2026-10-28T02:30:56Z","exploits":[{"source":"pocgithub","id":"dannyEndorTest/gin-vulnerable","title":"dannyEndorTest/gin-vulnerable","date":"2026-05-20","url":"https://github.com/dannyEndorTest/gin-vulnerable"}],"fixes":[{"ecosystem":"Go","package":"github.com/gin-gonic/gin","fixed_in":["1.9.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"golang-github-gin-gonic-gin","fixed_in":["1.8.1-3"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"golang-github-gin-gonic-gin","fixed_in":["1.8.1-3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/gin-gonic/gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3.1-0.20190301021747-ccb9e902956d"},{"fixed":"1.9.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-1","1.8.1-2","1.8.1-3","1.8.1-4"]},{"source":"osv","ecosystem":"Debian:13","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1-3"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1-3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/gin-gonic/gin","ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.1-0.20190301021747-ccb9e902956d"},{"fixed":"1.9.1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/gin-gonic/gin","ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.1-0.20190301021747-ccb9e902956d"},{"fixed":"1.9.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.2+dfsg1-2","1.2+dfsg1-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.3.0+dfsg1-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.3-4"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-1","1.8.1-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-2","1.8.1-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-3","1.8.1-4"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"golang-github-gin-gonic-gin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-3"]}],"products":[{"vendor":"gin-gonic","product":"gin"},{"vendor":"github.com/gin-gonic/gin","product":"github.com/gin-gonic/gin"}],"references":[{"url":"https://github.com/gin-gonic/gin/issues/3555","tags":["x_transferred","Exploit","Issue Tracking","report","web"]},{"url":"https://github.com/gin-gonic/gin/pull/3556","tags":["x_transferred","Issue Tracking","Patch","fix","web","report"]},{"url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","tags":["x_transferred","Release Notes","web","report"]},{"url":"https://pkg.go.dev/vuln/GO-2023-1737","tags":["x_transferred","Third Party Advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-2c4m-59x9-fr2g"},{"url":"https://pkg.go.dev","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29401.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-29401","tags":["advisory"]},{"url":"https://github.com/gin-gonic/gin","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2023-29401","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-29401","tags":["report"]},{"url":"https://github.com/gin-gonic/gin/commit/2d4bbec941551479b1fdf1e54ece03e6e82a7e72","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2023-29401","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","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\u0026quot;;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.","status":"published","published":"2023-06-08T20:27:15.057Z","modified":"2025-01-06T19:30:14.833Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"adp"}],"updated_at":"2026-11-02T14:35:29.01154Z"}],"euvd":[{"id":"EUVD-2023-1445","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\u0026quot;;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.","status":"published","published":"2023-06-08T20:27:15Z","modified":"2025-01-06T19:30:14Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T00:04:25.174818Z"}],"ghsa":[{"id":"GHSA-2c4m-59x9-fr2g","title":"Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function","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\u0026quot;;x=.txt\" will be sent as a file named \"setup.bat\".\n\nIf 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.","status":"published","published":"2023-05-12T20:19:25Z","modified":"2023-11-05T05:03:38Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-494"],"updated_at":"2026-11-02T14:37:13.301199Z"}],"nvd":[{"id":"CVE-2023-29401","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\u0026quot;;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.","status":"published","published":"2023-06-08T21:15:16.62Z","modified":"2026-06-17T05:49:58.1Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-494"],"updated_at":"2026-11-02T14:08:05.329837Z"}],"osv":[{"id":"CVE-2023-29401","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","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\u0026quot;;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.","status":"published","published":"2023-06-08T20:27:15.057Z","modified":"2026-10-28T02:30:56.822572719Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:31.468318Z"},{"id":"DEBIAN-CVE-2023-29401","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\u0026quot;;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.","status":"published","published":"2023-06-08T21:15:16.62Z","modified":"2026-10-26T18:00:55.996468422Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:39.679062Z"},{"id":"GHSA-2c4m-59x9-fr2g","title":"Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function","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\u0026quot;;x=.txt\" will be sent as a file named \"setup.bat\".\n\nIf 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.","status":"published","published":"2023-05-12T20:19:25Z","modified":"2023-11-08T04:12:18.674169Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-494"],"updated_at":"2026-11-02T15:46:34.338541Z"},{"id":"UBUNTU-CVE-2023-29401","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\u0026quot;;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.","status":"published","published":"2023-06-08T21:15:00Z","modified":"2026-10-17T12:57:18.60246741Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T16:54:20.997471Z"},{"id":"GO-2023-1737","title":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","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\u0026quot;;x=.txt\" will be sent as a file named \"setup.bat\".\n\nIf 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.","status":"published","published":"2023-05-11T18:59:56Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:01.185262Z"}]}}
