Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS0yYzRtLTU5eDktZnIyZ84AAzUB

Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function

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.

Permalink: https://github.com/advisories/GHSA-2c4m-59x9-fr2g
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yYzRtLTU5eDktZnIyZ84AAzUB
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 1 year ago
Updated: 6 months ago


CVSS Score: 4.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Identifiers: GHSA-2c4m-59x9-fr2g, CVE-2023-29401
References: Repository: https://github.com/gin-gonic/gin
Blast Radius: 20.4

Affected Packages

go:github.com/gin-gonic/gin
Dependent packages: 23,911
Dependent repositories: 55,159
Downloads:
Affected Version Ranges: >= 1.3.1-0.20190301021747-ccb9e902956d, < 1.9.1
Fixed in: 1.9.1
All affected versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.8.0, 1.8.1, 1.8.2, 1.9.0
All unaffected versions: 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.3.0, 1.9.1