{"api_version":"1","generated_at":"2026-07-23T14:09:48+00:00","cve":"CVE-2023-29401","urls":{"html":"https://cve.report/CVE-2023-29401","api":"https://cve.report/api/cve/CVE-2023-29401.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-29401","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401"},"summary":{"title":"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&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.","state":"PUBLIC","assigner":"security@golang.org","published_at":"2023-06-08 21:15:00","updated_at":"2023-06-16 12:45:00"},"problem_types":["CWE-494"],"metrics":[],"references":[{"url":"https://pkg.go.dev/vuln/GO-2023-1737","name":"https://pkg.go.dev/vuln/GO-2023-1737","refsource":"MISC","tags":[],"title":"GO-2023-1737 - Go Packages","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/gin-gonic/gin/issues/3555","name":"https://github.com/gin-gonic/gin/issues/3555","refsource":"MISC","tags":[],"title":"FileAttachment() is vulnerable to Reflect File Download · Issue #3555 · gin-gonic/gin · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/gin-gonic/gin/pull/3556","name":"https://github.com/gin-gonic/gin/pull/3556","refsource":"MISC","tags":[],"title":"fix lack of escaping of filename in Content-Disposition by motoyasu-saburi · Pull Request #3556 · gin-gonic/gin · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","name":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","refsource":"MISC","tags":[],"title":"Release v1.9.1 · gin-gonic/gin · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-29401","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29401","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"29401","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gin-gonic","cpe5":"gin","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-29401","ASSIGNER":"security@golang.org","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE 20: Improper Input Validation"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"github.com/gin-gonic/gin","product":{"product_data":[{"product_name":"github.com/gin-gonic/gin","version":{"version_data":[{"version_affected":"<","version_name":"1.3.1-0.20190301021747-ccb9e902956d","version_value":"1.9.1"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/gin-gonic/gin/issues/3555","refsource":"MISC","name":"https://github.com/gin-gonic/gin/issues/3555"},{"url":"https://github.com/gin-gonic/gin/pull/3556","refsource":"MISC","name":"https://github.com/gin-gonic/gin/pull/3556"},{"url":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1","refsource":"MISC","name":"https://github.com/gin-gonic/gin/releases/tag/v1.9.1"},{"url":"https://pkg.go.dev/vuln/GO-2023-1737","refsource":"MISC","name":"https://pkg.go.dev/vuln/GO-2023-1737"}]},"credits":[{"lang":"en","value":"motoyasu-saburi"}]},"nvd":{"publishedDate":"2023-06-08 21:15:00","lastModifiedDate":"2023-06-16 12:45:00","problem_types":["CWE-494"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":4.3,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":1.4}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:gin-gonic:gin:*:*:*:*:*:*:*:*","versionStartIncluding":"1.3.1-0.20190301021747-ccb9e902956d","versionEndExcluding":"1.9.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}