CVE-2023-29401
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.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Puntuación base: 4.3
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.49%
- Percentil entre todas las CVEs puntuadas: 40
- Fecha de la puntuación: 6/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-494
Referencias
- 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
- 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
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-29401",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-29401",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2025-01-06T19:29:16.540610Z"
}
}
],
"cvssMetricV31": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 1.4,
"exploitabilityScore": 2.8
},
{
"type": "Secondary",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 1.4,
"exploitabilityScore": 2.8
}
]
},
"affected": [
{
"source": "security@golang.org",
"affectedData": [
{
"vendor": "github.com/gin-gonic/gin",
"product": "github.com/gin-gonic/gin",
"versions": [
{
"status": "affected",
"version": "1.3.1-0.20190301021747-ccb9e902956d",
"lessThan": "1.9.1",
"versionType": "semver"
}
],
"packageName": "github.com/gin-gonic/gin",
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "Context.FileAttachment"
}
]
}
]
}
],
"published": "2023-06-08T21:15:16.620",
"references": [
{
"url": "https://github.com/gin-gonic/gin/issues/3555",
"tags": [
"Exploit",
"Issue Tracking"
],
"source": "security@golang.org"
},
{
"url": "https://github.com/gin-gonic/gin/pull/3556",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "security@golang.org"
},
{
"url": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1",
"tags": [
"Release Notes"
],
"source": "security@golang.org"
},
{
"url": "https://pkg.go.dev/vuln/GO-2023-1737",
"tags": [
"Third Party Advisory"
],
"source": "security@golang.org"
},
{
"url": "https://github.com/gin-gonic/gin/issues/3555",
"tags": [
"Exploit",
"Issue Tracking"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/gin-gonic/gin/pull/3556",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1",
"tags": [
"Release Notes"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://pkg.go.dev/vuln/GO-2023-1737",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-494"
}
]
}
],
"descriptions": [
{
"lang": "en",
"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";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."
}
],
"lastModified": "2026-06-17T05:49:58.100",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:gin-gonic:gin:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "842C7CA1-3FF5-4A19-B88F-33DFA3404ACC",
"versionEndExcluding": "1.9.1",
"versionStartIncluding": "1.3.1-0.20190301021747-ccb9e902956d"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security@golang.org"
}