Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Partial Red Hat: 3 fixed, 11 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-494.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| github.com/gin-gonic/gin | github.com/gin-gonic/gin | 1.3.1-0.20190301021747-ccb9e902956d to before 1.9.1 | 1.9.1 | Patch available | CNA |
| — | github.com/gin-gonic/gin (Go) | 1.3.1-0.20190301021747-ccb9e902956d to before 1.9.1 | 1.9.1 | Patch available | GHSA-2c4m-59x9-fr2g |
- github.com/gin-gonic/gin Vendorgithub.com/gin-gonic/gin Affected 1.3.1-0.20190301021747-ccb9e902956d to before 1.9.1 Fixed in 1.9.1 Patch available CNA
- github.com/gin-gonic/gin (Go) Vendor— Affected 1.3.1-0.20190301021747-ccb9e902956d to before 1.9.1 Fixed in 1.9.1 Patch available GHSA-2c4m-59x9-fr2g
Remediation
- Fix · CNA github.com/gin-gonic/gin (github.com/gin-gonic/gin) Fixed in 1.9.1
- Fix · GHSA-2c4m-59x9-fr2g github.com/gin-gonic/gin (Go) Fixed in 1.9.1 Advisory →
Red Hat 4 advisories
- RHSA-2024:8697 Released 2024-11-08 · Red Hat rating ImportantOpenShift Container Platform 4.14.40 bug fix and security update
- Red Hat OpenShift Container Platform 4.14 openshift4/cloud-network-config-controller-rhel8, openshift4/egress-router-cni-rhel8, openshift4/kubevirt-csi-driver-rhel8 +47
- RHSA-2024:8235 Released 2024-10-23 · Red Hat rating ImportantOpenShift Container Platform 4.14.39 security update
- Red Hat OpenShift Container Platform 4.14 openshift4/ose-agent-installer-api-server-rhel8, openshift4/ose-cluster-baremetal-operator-rhel8, openshift4/ose-ibm-cloud-controller-manager-rhel8 +5
- RHSA-2023:5006 Released 2023-10-31 · Red Hat rating ImportantOpenShift Container Platform 4.14.0 bug fix and security update
- Red Hat OpenShift Container Platform 4.14 openshift4/cloud-network-config-controller-rhel8, openshift4/driver-toolkit-rhel9, openshift4/egress-router-cni-rhel8 +47
Show 1 more Red Hat advisories
- RHSA-2023:4293 Released 2023-07-27 · Red Hat rating ModerateMigration Toolkit for Containers (MTC) 1.7.11 security and bug fix update
- 8Base-RHMTC-1.7 rhmtc/openshift-migration-controller-rhel8, rhmtc/openshift-migration-velero-plugin-for-aws-rhel8, rhmtc/openshift-migration-velero-plugin-for-gcp-rhel8 +3
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Migration Toolkit for Applications 6 | Affected | No fix planned: Will not fix |
| OpenShift Serverless | Affected | No fix planned: Will not fix |
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet |
| Red Hat Advanced Cluster Security 3 | Affected | No fix planned: Will not fix |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet |
| Red Hat OpenShift Data Science (RHODS) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet |
| Red Hat OpenShift GitOps | Affected | No fix planned: Will not fix |
| Red Hat OpenShift Virtualization 4 | Affected | No fix yet |
| Red Hat Quay 3 | Affected | No fix yet |
| Red Hat Web Terminal | Affected | No fix yet: Fix deferred |
| 8Base-MTV-2.5 | Fixed | — |
| 8Base-RHMTC-1.7 | Fixed | RHSA-2023:4293 |
| Red Hat OpenShift Container Platform 4.14 | Fixed | RHSA-2023:5006, RHSA-2024:8235, RHSA-2024:8697 |
Not affected: 11 products
- 8Base-MTV-2.5
- 8Base-RHMTC-1.7
- Custom Metric Autoscaler operator for Red Hat Openshift
- Logging Subsystem for Red Hat OpenShift
- Migration Toolkit for Applications 6
- Migration Toolkit for Virtualization
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 4.14
- Red Hat OpenShift Container Platform Assisted Installer 1
- Red Hat OpenStack Platform 18.0
Timeline
- 2026-10-02 Threatist record created from CVE-2023-29401
- 2026-10-03 Alias added: GHSA-2c4m-59x9-fr2g
References
More Gin-gonic Gin vulnerabilities
- TI-2020-18795 Arbitrary log line injection in github.com/gin-gonic/gin CVSS 3.1HIGH 7.5
- TI-2023-11349 Improper input validation in github.com/gin-gonic/gin CVSS 3.1HIGH 7.3
- TI-2020-17293 HTTP response splitting in github.com/gin-gonic/gin CVSS 3.1HIGH 7.1
Sources
- CVE-2023-29401 · CVE Program
- CVE-2023-29401 · NVD
- FIRST EPSS
- GHSA-2c4m-59x9-fr2g · GitHub Advisory Database · CC BY 4.0
- CVE-2023-29401 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences