Vulnerabilities in pkg:gem/trestle-auth

PACKAGE
Advisory Identifier: GHSA-h8hx-2c5r-32cf
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/trestle-auth

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/trestle-auth. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-h8hx-2c5r-32cf CVE-2021-29435 HIGH Cross-Site Request Forgery (CSRF) in trestle-auth

CVE-2021-29435 at a Glance

CVE Identifier CVE-2021-29435
GHSA Identifier GHSA-h8hx-2c5r-32cf
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Trestle auth
Package Ecosystem RubyGems
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

trestle-auth fixed: 0.4.2
Upgrade trestle-auth to 0.4.2
Verify Direct and Transitive Dependencies

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

### Impact A 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. ### Patches The vulnerability has been fixed in trestle-auth 0.4.2 released to RubyGems. ### For more information If you have any questions or comments about this advisory: * Open an issue in [trestle-auth](https://github.com/TrestleAdmin/trestle-auth/issues) * Email the maintainer at [sam@sampohlenz.com](mailto:sam@sampohlenz.com)

CVE-2021-29435 Affected Trestle auth Versions

1 component(s)
Fixed Versions:
0.4.2
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?
CVE-2021-29435 is a security vulnerability in Trestle auth involving Cross-Site Request Forgery (CSRF) in trestle-auth under CWE-352: Cross-Site Request Forgery (CSRF).
Which Trestle auth versions are affected?
Affected versions include releases prior to 0.4.2 across affected packages: trestle-auth.
What version fixes CVE-2021-29435?
Upgrading to 0.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is trestle-auth affected?
Yes, trestle-auth is affected in releases prior to 0.4.2. Upgrade your dependency to 0.4.2 or later.
What is the CVSS score of CVE-2021-29435?
CVE-2021-29435 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2021-29435?
CVE-2021-29435 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (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.).
How can I check RubyGems dependencies for CVE-2021-29435?
Run the dependency tree command: 'inspect dependencies for trestle-auth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}