CVE-2021-29435: Cross-Site Request Forgery (CSRF) in trestle-auth
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.35561%
CWE
Published
4/13/2021
Updated
5/4/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
trestle-auth | rubygems | >= 0.4.0, < 0.4.2 | 0.4.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from the execution order of before_actions. The commit diff shows the fix involved adding 'protect_from_forgery prepend: true' to ensure CSRF checks occur before authentication. In vulnerable versions, the authentication before_actions were prepended first, making CSRF validation happen after authentication. This allowed forged requests to bypass CSRF checks once the user was authenticated. The root cause is the inclusion order in the Authentication module's 'included' block.