GHSA-7v7m-pcw5-h3cg: Pusher/pusher php server Authentication Bypass Vulnerability

MODERATE
CVSS 6.5
CWE-74
Published
Advisory Summary

GHSA-7v7m-pcw5-h3cg is a MODERATE (CVSS 6.5) authentication bypass vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Pusher/pusher php server libraries in the Packagist ecosystem. The issue involves pusher service channel authentication bypass. Remediation is available by upgrading affected packages to version 2.2.1.

GHSA-7v7m-pcw5-h3cg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7v7m-pcw5-h3cg
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Pusher/pusher php server
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/S:U/C:L/I:L/A:N).

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

How to Fix GHSA-7v7m-pcw5-h3cg

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

pusher/pusher-php-server fixed: 2.2.1
Upgrade pusher/pusher-php-server to 2.2.1
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 pusher/pusher-php-server

How to Check if You Are Affected

To determine whether your application is affected by GHSA-7v7m-pcw5-h3cg, inspect your project dependencies for Pusher/pusher php server:

inspect dependencies for pusher/pusher-php-server

Analyze the terminal output to locate any version of Pusher/pusher php server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Pusher/pusher php server, 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 service offered by Pusher provides "private" channels with an authentication mechanism that restricts subscription access. The decision on allowing subscriptions to private channels is delegated to customers, who implement an authentication endpoint. End-users request a token from this endpoint to join a specific channel. The token is an HMAC signature of the end-user's connection ID (socket_id) and the desired channel. The issue arises from a lack of validation in the libraries provided to customers. This vulnerability allows a malicious end-user to submit a malformed socket_id field, leading the customer to unknowingly sign a string. This signed string grants access to a different private channel than the one the end-user is ostensibly requesting. Consequently, a malicious end-user, with permission to subscribe to one private channel, can forge permission for any private channel owned by the same customer. Additionally, the HTTP API is secured by requiring a signature with each request, generated by the customer's secret key. In specific cases, a malicious end-user may deceive a customer into signing a value for socket_id, effectively authenticating an API request to Pusher.

GHSA-7v7m-pcw5-h3cg Affected Pusher/pusher php server Versions

1 component(s)
Fixed Versions:
2.2.1
Product / Package Ecosystem Affected Versions Fixed Version
pusher/pusher-php-server
Packagist
< 2.2.1
2.2.1

References

Frequently Asked Questions

What is GHSA-7v7m-pcw5-h3cg?
GHSA-7v7m-pcw5-h3cg is a security vulnerability in Pusher/pusher php server involving Pusher Service Channel Authentication Bypass under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Pusher/pusher php server versions are affected?
Affected versions include releases prior to 2.2.1 across affected packages: pusher/pusher-php-server.
What version fixes GHSA-7v7m-pcw5-h3cg?
Upgrading to 2.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pusher/pusher-php-server affected?
Yes, pusher/pusher-php-server is affected in releases prior to 2.2.1. Upgrade your dependency to 2.2.1 or later.
What is the CVSS score of GHSA-7v7m-pcw5-h3cg?
GHSA-7v7m-pcw5-h3cg has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with GHSA-7v7m-pcw5-h3cg?
GHSA-7v7m-pcw5-h3cg is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Packagist dependencies for GHSA-7v7m-pcw5-h3cg?
Run the dependency tree command: 'inspect dependencies for pusher/pusher-php-server'. 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-7v7m-pcw5-h3cg",
  "modified" : "2024-05-20T17:49:10Z",
  "published" : "2024-05-20T17:49:10Z",
  "aliases" : [ ],
  "summary" : " Pusher Service Channel Authentication Bypass",
  "details" : "The service offered by Pusher provides \"private\" channels with an authentication mechanism that restricts subscription access. The decision on allowing subscriptions to private channels is delegated to customers, who implement an authentication endpoint. End-users request a token from this endpoint to join a specific channel. The token is an HMAC signature of the end-user's connection ID (socket_id) and the desired channel.\n\nThe issue arises from a lack of validation in the libraries provided to customers. This vulnerability allows a malicious end-user to submit a malformed socket_id field, leading the customer to unknowingly sign a string. This signed string grants access to a different private channel than the one the end-user is ostensibly requesting. Consequently, a malicious end-user, with permission to subscribe to one private channel, can forge permission for any private channel owned by the same customer.\n\nAdditionally, the HTTP API is secured by requiring a signature with each request, generated by the customer's secret key. In specific cases, a malicious end-user may deceive a customer into signing a value for socket_id, effectively authenticating an API request to Pusher.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pusher/pusher-php-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pusher/pusher-http-php/commit/5a2ccdd3b14932b9cb5d0f59cf81d19c447214f1"
  }, {
    "type" : "WEB",
    "url" : "https://blog.pusher.com/update-on-security"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/pusher/pusher-php-server/2015-05-13.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pusher/pusher-http-php"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-20T17:49:10Z",
    "nvd_published_at" : null
  }
}