golang-github-gin-gonic-gin — security advisory
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";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.
- Products
- golang-github-gin-gonic-gin
- Affected versions
- 1.2+dfsg1-2, 1.2+dfsg1-2ubuntu1, 1.3.0+dfsg1-3, 1.6.3-4, 1.8.1-1, 1.8.1-2, 1.8.1-3, 1.8.1-4
- Fixed versions
- Not specified
- CVEs
- CVE-2023-29401
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:40 UTC · Revision 1
Source evidence
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";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.
osv:UBUNTU-CVE-2023-29401
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
golang-github-gin-gonic-gin
Fixed versions: Not specified
Complete source record
{
"id": "984d1b29bcf3b48f23f70f07930fa6be30591eeac084d1a2965eb0a7a5f671b8",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2023-29401",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2023-29401",
"summary": "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\";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.",
"evidence": "osv:UBUNTU-CVE-2023-29401",
"products": [
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.2+dfsg1-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.2+dfsg1-2ubuntu1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.0+dfsg1-3",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.6.3-4",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.8.1-1",
"evidence": "/affected/3/versions"
},
{
"value": "1.8.1-2",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.8.1-2",
"evidence": "/affected/4/versions"
},
{
"value": "1.8.1-3",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.8.1-3",
"evidence": "/affected/5/versions"
},
{
"value": "1.8.1-4",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-gonic-gin",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.8.1-3",
"evidence": "/affected/6/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2023-29401",
"aliases": [
"UBUNTU-CVE-2023-29401"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "low"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=bionic",
"ecosystem": "Ubuntu:18.04:LTS"
},
"versions": [
"1.2+dfsg1-2",
"1.2+dfsg1-2ubuntu1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.2+dfsg1-2ubuntu1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"1.3.0+dfsg1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.3.0+dfsg1-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"1.6.3-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.6.3-4"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"1.8.1-1",
"1.8.1-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.8.1-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"1.8.1-2",
"1.8.1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.8.1-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"1.8.1-3",
"1.8.1-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.8.1-4"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-gonic-gin",
"purl": "pkg:deb/ubuntu/golang-github-gin-gonic-gin?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"1.8.1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-29401.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-gonic-gin-dev",
"binary_version": "1.8.1-3"
}
]
}
}
],
"modified": "2026-10-17T12:57:18.602467410Z",
"provider": "osv",
"upstream": [
"CVE-2023-29401"
],
"references": [
"https://ubuntu.com/security/CVE-2023-29401",
"https://pkg.go.dev/vuln/GO-2023-1737",
"https://github.com/gin-gonic/gin/releases/tag/v1.9.1",
"https://github.com/gin-gonic/gin/issues/3555",
"https://github.com/gin-gonic/gin/pull/3556",
"https://www.cve.org/CVERecord?id=CVE-2023-29401",
"https://github.com/gin-gonic/gin/commit/2d4bbec941551479b1fdf1e54ece03e6e82a7e72"
]
},
"related_cves": [
{
"value": "CVE-2023-29401",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 357150,
"published_at": "2023-06-08T21:15:00+00:00"
}