{"cve":"CVE-2023-29401","nvd":{"published":"2023-06-08T21:15:16.620","modified":"2026-06-17T05:49:58.100","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"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},"cwes":["CWE-494"],"references":["https://github.com/gin-gonic/gin/issues/3555","https://github.com/gin-gonic/gin/pull/3556","https://github.com/gin-gonic/gin/releases/tag/v1.9.1","https://pkg.go.dev/vuln/GO-2023-1737","https://github.com/gin-gonic/gin/issues/3555"],"products":["gin-gonic:gin"],"source":"nvd","synced_at":"2026-10-19T21:38:24.161619714+00:00"},"epss":{"cve":"CVE-2023-29401","score":0.00482,"percentile":0.41568,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-2c4m-59x9-fr2g","url":"https://osv.dev/vulnerability/GHSA-2c4m-59x9-fr2g","summary":"Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function","modified":"2023-11-08T04:12:18.674169Z","packages":[{"ecosystem":"Go","name":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","ranges":[">=1.3.1-0.20190301021747-ccb9e902956d <1.9.1"],"fixed":["1.9.1"]}]},{"id":"GO-2023-1737","url":"https://osv.dev/vulnerability/GO-2023-1737","summary":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","modified":"2024-05-20T16:03:47Z","packages":[{"ecosystem":"Go","name":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","ranges":[">=1.3.1-0.20190301021747-ccb9e902956d <1.9.1"],"fixed":["1.9.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}