CVE-2024-56733: Pwpush Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-4fwj-m62q-pp47
CVSS 5.7
CWE-384
Published
Advisory Summary

CVE-2024-56733 is a MODERATE (CVSS 5.7) remote code execution vulnerability (CWE-384: Session Fixation) affecting Pwpush libraries in the RubyGems ecosystem. The issue involves password pusher allows session token interception leading to potential hijacking. Remediation is available in the latest vendor maintenance releases.

CVE-2024-56733 at a Glance

CVE Identifier CVE-2024-56733
GHSA Identifier GHSA-4fwj-m62q-pp47
Severity MODERATE
CVSS v3.1 Base Score 5.7
CWE Classification CWE-384: Session Fixation
Affected Product Pwpush
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.7

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

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

How to Fix CVE-2024-56733

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

pwpush fixed: Latest secure release
Upgrade pwpush to Latest secure release
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 pwpush

How to Check if You Are Affected

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

inspect dependencies for pwpush

Analyze the terminal output to locate any version of Pwpush in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-384: Session Fixation, where authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions. In Pwpush, 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 has been reported in Password Pusher where an attacker can copy the session cookie before a user logs out, potentially allowing session hijacking. Although the session token is replaced and invalidated upon logout, if an attacker manages to capture the session cookie before this process, they can use the token to gain unauthorized access to the user's session until the token expires or is manually cleared. This vulnerability hinges on the attacker's ability to access the session cookie during an active session, either through a man-in-the-middle attack, by exploiting another vulnerability like XSS, or via direct access to the victim's device. ### Patches Although there is no direct resolution to this vulnerability, it is recommended to always use the latest version of Password Pusher to best mitigate risk. ### Workarounds If self-hosting, ensure Password Pusher is hosted exclusively over SSL connections to encrypt traffic and prevent session cookies from being intercepted in transit. Additionally, implement best practices in local security to safeguard user systems, browsers, and data against unauthorized access. To further mitigate session hijacking risks, Password Pusher implements the following security measures: 1. **Automatic Session Expiration**: Sessions are automatically expired after 2 hours of inactivity, reducing the window for potential exploitation. 2. **Session Reset on Login and Logout**: Sessions are fully reset both when a user logs in and logs out, ensuring that session tokens are not reusable post-logout. This practice invalidates old session tokens and issues new ones, minimizing the risk of session hijacking. 3. **Encrypted Cookies**: Cookies are encrypted using the value of SECRET_KEY_BASE from the application's configuration. This encryption adds a layer of protection against tampering or reading the session cookie's contents if intercepted, although it doesn't prevent the cookie from being used if stolen. **Note**: While these measures significantly enhance security, they are part of a broader security strategy. ### References * https://edgeguides.rubyonrails.org/security.html#session-hijacking ### Credits Thank you to [Positive Technologies](https://www.ptsecurity.com/ww-en/) for reporting and working with me to bring this CVE to the community.

CVE-2024-56733 Affected Pwpush Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pwpush
RubyGems
≤ 1.50.3

References

Frequently Asked Questions

What is CVE-2024-56733?
CVE-2024-56733 is a security vulnerability in Pwpush involving Password Pusher Allows Session Token Interception Leading to Potential Hijacking under CWE-384: Session Fixation.
Which Pwpush versions are affected?
Affected versions include releases prior to current release patches across affected packages: pwpush.
What version fixes CVE-2024-56733?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pwpush affected?
Yes, pwpush is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-56733?
CVE-2024-56733 has a CVSS v3.1 base score of 5.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-56733?
CVE-2024-56733 is classified under CWE-384: Session Fixation (Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.).
How can I check RubyGems dependencies for CVE-2024-56733?
Run the dependency tree command: 'inspect dependencies for pwpush'. 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-4fwj-m62q-pp47",
  "modified" : "2024-12-31T18:42:50Z",
  "published" : "2024-12-30T16:46:43Z",
  "aliases" : [ "CVE-2024-56733" ],
  "summary" : "Password Pusher Allows Session Token Interception Leading to Potential Hijacking",
  "details" : "### Impact\n\nA vulnerability has been reported in Password Pusher where an attacker can copy the session cookie before a user logs out, potentially allowing session hijacking.\n\nAlthough the session token is replaced and invalidated upon logout, if an attacker manages to capture the session cookie before this process, they can use the token to gain unauthorized access to the user's session until the token expires or is manually cleared.\n\nThis vulnerability hinges on the attacker's ability to access the session cookie during an active session, either through a man-in-the-middle attack, by exploiting another vulnerability like XSS, or via direct access to the victim's device.\n\n### Patches\n\nAlthough there is no direct resolution to this vulnerability, it is recommended to always use the latest version of Password Pusher to best mitigate risk.\n\n### Workarounds\n\nIf self-hosting, ensure Password Pusher is hosted exclusively over SSL connections to encrypt traffic and prevent session cookies from being intercepted in transit. Additionally, implement best practices in local security to safeguard user systems, browsers, and data against unauthorized access.\n\nTo further mitigate session hijacking risks, Password Pusher implements the following security measures:\n\n1. **Automatic Session Expiration**: Sessions are automatically expired after 2 hours of inactivity, reducing the window for potential exploitation.\n2. **Session Reset on Login and Logout**: Sessions are fully reset both when a user logs in and logs out, ensuring that session tokens are not reusable post-logout. This practice invalidates old session tokens and issues new ones, minimizing the risk of session hijacking.\n3. **Encrypted Cookies**: Cookies are encrypted using the value of SECRET_KEY_BASE from the application's configuration. This encryption adds a layer of protection against tampering or reading the session cookie's contents if intercepted, although it doesn't prevent the cookie from being used if stolen.\n\n**Note**: While these measures significantly enhance security, they are part of a broader security strategy.\n\n### References\n\n* https://edgeguides.rubyonrails.org/security.html#session-hijacking\n\n### Credits\n\nThank you to [Positive Technologies](https://www.ptsecurity.com/ww-en/) for reporting and working with me to bring this CVE to the community.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "pwpush"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.50.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pglombardo/PasswordPusher/security/advisories/GHSA-4fwj-m62q-pp47"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56733"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pglombardo/PasswordPusher"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/pwpush/CVE-2024-56733.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-384" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-30T16:46:43Z",
    "nvd_published_at" : "2024-12-30T17:15:09Z"
  }
}