{"answers":{"affected":"3 open source packages ship an affected version, including github.com/gin-gonic/gin. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-29401 exists.","fix":"Upgrade github.com/gin-gonic/gin to 1.9.1 or later.","what":"CVE-2023-29401 is a medium-severity vulnerability in github.com/gin-gonic/gin, published on 8 Jun 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-29401 and fix it if it is affected.\n\nWhat it is: CVE-2023-29401 is a medium-severity vulnerability in github.com/gin-gonic/gin, published on 8 Jun 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-29401 exists.\n\nAffected packages and fixed versions:\n- github.com/gin-gonic/gin (Go): affected from 1.3.1-0.20190301021747-ccb9e902956d; fixed in 1.9.1\n- github.com/gin-gonic/gin (Go): affected from 1.3.1-0.20190301021747-ccb9e902956d; fixed in 1.9.1\n- github.com/gin-gonic/gin (Go): affected from 1.3.1-0.20190301021747-ccb9e902956d; fixed in 1.9.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-29401/ (Markdown: https://insights.sbomify.com/CVE-2023-29401/index.md)","id":"CVE-2023-29401","markdown":"https://insights.sbomify.com/CVE-2023-29401/index.md","name":"CVE-2023-29401","record":{"aliases":["CLEANSTART-2026-UO59647","DEBIAN-CVE-2023-29401","GHSA-2c4m-59x9-fr2g","GO-2023-1737","MINI-c496-28jp-3pcm","UBUNTU-CVE-2023-29401"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Go web framework","requires_auth":"none","summary":"Attackers can manipulate Content-Disposition headers via unsanitized filenames, potentially tricking users into executing malicious files.","user_interaction":"required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Go","cpe":[{"product":"gin","vendor":"gin-gonic"}],"cvss":{"score":4.3,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-494","name":"Download of Code Without Integrity Check"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":"2026-05-20","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-05-20T05:45:18Z","kind":"github_poc","ref":"https://github.com/dannyEndorTest/gin-vulnerable","stars":0,"title":"Demo consumer for gin v1.7.0 (CVE-2023-29401) — Context.FileAttachment with user input. endorctl scan target."}],"tier":"weaponised"},"has_fix":true,"headline":"Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin","id":"CVE-2023-29401","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"other","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"Code injection via go command with cgo in cmd/go","id":"CVE-2023-29402"},"packages":[{"ecosystem":"Go","fixed":["1.9.1"],"introduced":["1.3.1-0.20190301021747-ccb9e902956d"],"last_affected":[],"package":"github.com/gin-gonic/gin","purl":null,"source":"GHSA-2c4m-59x9-fr2g"},{"ecosystem":"Go","fixed":["1.9.1"],"introduced":["1.3.1-0.20190301021747-ccb9e902956d"],"last_affected":[],"package":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","source":"GHSA-2c4m-59x9-fr2g"},{"ecosystem":"Go","fixed":["1.9.1"],"introduced":["1.3.1-0.20190301021747-ccb9e902956d"],"last_affected":[],"package":"github.com/gin-gonic/gin","purl":"pkg:golang/github.com/gin-gonic/gin","source":"GO-2023-1737"}],"prev":{"headline":"Improper handling of empty HTML attributes in html/template","id":"CVE-2023-29400"},"products":["github.com/gin-gonic/gin"],"published":"2023-06-08","related":[{"cvss_score":7.5,"headline":"Arbitrary log line injection in github.com/gin-gonic/gin","id":"CVE-2020-36567","kev_date_added":null,"published":"2022-12-27"},{"cvss_score":7.1,"headline":"HTTP Response Splitting","id":"CVE-2020-28483","kev_date_added":null,"published":"2021-01-20"},{"cvss_score":5.6,"headline":"Improper input validation in github.com/gin-gonic/gin","id":"CVE-2023-26125","kev_date_added":null,"published":"2023-05-04"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-06","vendors":["github.com/gin-gonic/gin"]},"summary":"Attackers can manipulate Content-Disposition headers via unsanitized filenames, potentially tricking users into executing malicious files.","url":"https://insights.sbomify.com/CVE-2023-29401/"}