CVE-2021-29435: Trestle auth Cross-Site Request Forgery (CSRF) Vulnerability
HIGHCVE-2021-29435 is a HIGH (CVSS 8.1) cross-site request forgery (csrf) vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Trestle auth libraries in the RubyGems ecosystem. The issue involves cross-site request forgery (csrf) in trestle-auth. Remediation is available by upgrading affected packages to version 0.4.2.
CVE-2021-29435 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2021-29435
To remediate this vulnerability, upgrade all affected Trestle auth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade trestle-auth to 0.4.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for trestle-auth
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-29435, inspect your project dependencies for Trestle auth:
inspect dependencies for trestle-auth
Analyze the terminal output to locate any version of Trestle auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Trestle auth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-29435 Affected Trestle auth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
trestle-auth
|
RubyGems |
≥ 0.4.0
< 0.4.2
|
0.4.2
|
References
Frequently Asked Questions
What is CVE-2021-29435?
Which Trestle auth versions are affected?
What version fixes CVE-2021-29435?
Is trestle-auth affected?
What is the CVSS score of CVE-2021-29435?
What CWE is associated with CVE-2021-29435?
How can I check RubyGems dependencies for CVE-2021-29435?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h8hx-2c5r-32cf",
"modified" : "2021-04-13T17:01:38Z",
"published" : "2021-04-13T17:01:50Z",
"aliases" : [ "CVE-2021-29435" ],
"summary" : "Cross-Site Request Forgery (CSRF) in trestle-auth",
"details" : "### Impact\nA vulnerability in trestle-auth versions 0.4.0 and 0.4.1 allows an attacker to create a form that will bypass Rails' built-in CSRF protection when submitted by a victim with a trestle-auth admin session. This potentially allows an attacker to alter protected data, including admin account credentials.\n\n### Patches\nThe vulnerability has been fixed in trestle-auth 0.4.2 released to RubyGems.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [trestle-auth](https://github.com/TrestleAdmin/trestle-auth/issues)\n* Email the maintainer at [sam@sampohlenz.com](mailto:sam@sampohlenz.com)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "trestle-auth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.0"
}, {
"fixed" : "0.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/TrestleAdmin/trestle-auth/security/advisories/GHSA-h8hx-2c5r-32cf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29435"
}, {
"type" : "WEB",
"url" : "https://github.com/TrestleAdmin/trestle-auth/commit/cb95b05cdb2609052207af07b4b8dfe3a23c11dc"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/trestle-auth/CVE-2021-29435.yml"
}, {
"type" : "WEB",
"url" : "https://rubygems.org/gems/trestle-auth"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-13T17:01:38Z",
"nvd_published_at" : "2021-04-13T20:15:00Z"
}
}