CVE-2021-30492: Zendesk/zendesk api client php Lack Of Input Validation Vulnerability

CRITICAL
Advisory Identifier: GHSA-q348-f93x-9gx4
CWE-20 CWE-918
Published
Advisory Summary

CVE-2021-30492 is a CRITICAL lack of input validation vulnerability (CWE-20: Improper Input Validation) affecting Zendesk/zendesk api client php libraries in the Packagist ecosystem. The issue involves lack of input validation in zendesk_api_client_php for zendesk subdomain. Remediation is available by upgrading affected packages to version 2.2.11.

CVE-2021-30492 at a Glance

CVE Identifier CVE-2021-30492
GHSA Identifier GHSA-q348-f93x-9gx4
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Zendesk/zendesk api client php
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2021-30492

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

zendesk/zendesk_api_client_php fixed: 2.2.11
Upgrade zendesk/zendesk_api_client_php to 2.2.11
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 zendesk/zendesk_api_client_php

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-30492, inspect your project dependencies for Zendesk/zendesk api client php:

inspect dependencies for zendesk/zendesk_api_client_php

Analyze the terminal output to locate any version of Zendesk/zendesk api client php in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.11), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Zendesk/zendesk api client php, 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 Lack of input validation of the Zendesk subdomain could expose users of the library to Server Side Request Forgery (SSRF). ### Resolution Validate the provided Zendesk subdomain to be a valid subdomain in: * getAuthUrl * getAccessToken

CVE-2021-30492 Affected Zendesk/zendesk api client php Versions

1 component(s)
Fixed Versions:
2.2.11
Product / Package Ecosystem Affected Versions Fixed Version
zendesk/zendesk_api_client_php
Packagist
< 2.2.11
2.2.11

References

Frequently Asked Questions

What is CVE-2021-30492?
CVE-2021-30492 is a security vulnerability in Zendesk/zendesk api client php involving Lack of Input Validation in zendesk_api_client_php for Zendesk Subdomain under CWE-20: Improper Input Validation.
Which Zendesk/zendesk api client php versions are affected?
Affected versions include releases prior to 2.2.11 across affected packages: zendesk/zendesk_api_client_php.
What version fixes CVE-2021-30492?
Upgrading to 2.2.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zendesk/zendesk_api_client_php affected?
Yes, zendesk/zendesk_api_client_php is affected in releases prior to 2.2.11. Upgrade your dependency to 2.2.11 or later.
What CWE is associated with CVE-2021-30492?
CVE-2021-30492 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Packagist dependencies for CVE-2021-30492?
Run the dependency tree command: 'inspect dependencies for zendesk/zendesk_api_client_php'. 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-q348-f93x-9gx4",
  "modified" : "2021-04-28T22:29:16Z",
  "published" : "2021-04-29T21:53:06Z",
  "aliases" : [ "CVE-2021-30492" ],
  "summary" : "Lack of Input Validation in zendesk_api_client_php for Zendesk Subdomain",
  "details" : "### Impact\nLack of input validation of the Zendesk subdomain could expose users of the library to Server Side Request Forgery (SSRF).\n\n### Resolution\nValidate the provided Zendesk subdomain to be a valid subdomain in:\n* getAuthUrl\n* getAccessToken",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendesk/zendesk_api_client_php"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zendesk/zendesk_api_client_php/security/advisories/GHSA-q348-f93x-9gx4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zendesk/zendesk_api_client_php/pull/466"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zendesk/zendesk_api_client_php/commit/b451b743d9d6d81a9abf7cb86e70ec9c5332123e"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-918" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-28T22:29:16Z",
    "nvd_published_at" : null
  }
}