CVE-2024-28862: Rotp ROTP 6.2.2 And 6.2.1 Has Vulnerability

MODERATE
Advisory Identifier: GHSA-x2h8-qmj4-g62f
CVSS 5.3
CWE-276
Published
Advisory Summary

CVE-2024-28862 is a MODERATE (CVSS 5.3) rotp 6.2.2 and 6.2.1 has vulnerability (CWE-276: Incorrect Default Permissions) affecting Rotp libraries in the RubyGems ecosystem. The issue involves rotp 6.2.2 and 6.2.1 has 0666 permissions for the .rb files.. Remediation is available by upgrading affected packages to version 6.3.0.

CVE-2024-28862 at a Glance

CVE Identifier CVE-2024-28862
GHSA Identifier GHSA-x2h8-qmj4-g62f
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Rotp
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-28862

To remediate this vulnerability, upgrade all affected Rotp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rotp fixed: 6.3.0
Upgrade rotp to 6.3.0
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 rotp

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-28862, inspect your project dependencies for Rotp:

inspect dependencies for rotp

Analyze the terminal output to locate any version of Rotp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.3.0), 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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Rotp, 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

The Ruby One Time Password library (ROTP) is an open source library for generating and validating one time passwords. Affected versions had overly permissive default permissions. Users should patch to version 6.3.0. Users unable to patch may correct file permissions after installation.

CVE-2024-28862 Affected Rotp Versions

1 component(s)
Fixed Versions:
6.3.0
Product / Package Ecosystem Affected Versions Fixed Version
rotp
RubyGems
≥ 6.2.1
< 6.3.0
6.3.0

References

Frequently Asked Questions

What is CVE-2024-28862?
CVE-2024-28862 is a security vulnerability in Rotp involving ROTP 6.2.2 and 6.2.1 has 0666 permissions for the .rb files. under CWE-276: Incorrect Default Permissions.
Which Rotp versions are affected?
Affected versions include releases prior to 6.3.0 across affected packages: rotp.
What version fixes CVE-2024-28862?
Upgrading to 6.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rotp affected?
Yes, rotp is affected in releases prior to 6.3.0. Upgrade your dependency to 6.3.0 or later.
What is the CVSS score of CVE-2024-28862?
CVE-2024-28862 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-28862?
CVE-2024-28862 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check RubyGems dependencies for CVE-2024-28862?
Run the dependency tree command: 'inspect dependencies for rotp'. 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-x2h8-qmj4-g62f",
  "modified" : "2025-12-05T18:32:40Z",
  "published" : "2024-03-18T17:21:46Z",
  "aliases" : [ "CVE-2024-28862" ],
  "summary" : "ROTP 6.2.2 and 6.2.1 has 0666 permissions for the .rb files.",
  "details" : "The Ruby One Time Password library (ROTP) is an open source library for generating and validating one time passwords. Affected versions had overly permissive default permissions. Users should patch to version 6.3.0. Users unable to patch may correct file permissions after installation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rotp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.1"
      }, {
        "fixed" : "6.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mdp/rotp/security/advisories/GHSA-x2h8-qmj4-g62f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-28862"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mdp/rotp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rotp/CVE-2024-28862.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-18T17:21:46Z",
    "nvd_published_at" : "2024-03-16T00:15:07Z"
  }
}