{"id":"GHSA-2c4m-59x9-fr2g","summary":"Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function","details":"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\".\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.","aliases":["CVE-2023-29401","GO-2023-1737"],"modified":"2023-11-08T04:12:18.674169Z","published":"2023-05-12T20:19:25Z","database_specific":{"github_reviewed_at":"2023-05-12T20:19:25Z","cwe_ids":["CWE-494"],"github_reviewed":true,"nvd_published_at":"2023-06-08T21:15:16Z","severity":"MODERATE"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401"},{"type":"WEB","url":"https://github.com/gin-gonic/gin/issues/3555"},{"type":"WEB","url":"https://github.com/gin-gonic/gin/pull/3556"},{"type":"PACKAGE","url":"https://github.com/gin-gonic/gin"},{"type":"WEB","url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2023-1737"}],"affected":[{"package":{"name":"github.com/gin-gonic/gin","ecosystem":"Go","purl":"pkg:golang/github.com/gin-gonic/gin"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.1-0.20190301021747-ccb9e902956d"},{"fixed":"1.9.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/05/GHSA-2c4m-59x9-fr2g/GHSA-2c4m-59x9-fr2g.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"}]}