CVE-2018-25060: Macaron csrf missing encryption and has sensitive cookies in HTTP session without secure attribute
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.12269%
CWE
Published
12/30/2022
Updated
3/1/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/go-macaron/csrf | go | < 0.0.0-20180426211050-dadd1711a617 | 0.0.0-20180426211050-dadd1711a617 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the pre-patch implementation in csrf.go
where ctx.SetCookie
was called with a hardcoded 'false' for the secure parameter (6th argument). The Options struct contained a Secure flag that was not being utilized in this call, making it impossible to set secure cookies even when configured. The commit dadd171
specifically fixes this by replacing 'false' with opt.Secure
in the Generate handler. This function
is directly responsible for cookie generation and was the focal point of the vulnerability as shown in the diff and commit message.