CVE-2021-29476: Rmccue/requests Insecure Deserialization Of Untrusted Data Vulnerability

CRITICAL
Advisory Identifier: GHSA-52qp-jpq7-6c54
CVSS 9.8
CWE-502
Published
Advisory Summary

CVE-2021-29476 is a CRITICAL (CVSS 9.8) insecure deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Rmccue/requests libraries in the Packagist ecosystem. The issue involves insecure deserialization of untrusted data in rmccue/requests. Remediation is available by upgrading affected packages to version 1.8.0.

CVE-2021-29476 at a Glance

CVE Identifier CVE-2021-29476
GHSA Identifier GHSA-52qp-jpq7-6c54
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Rmccue/requests
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-29476

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

rmccue/requests fixed: 1.8.0
Upgrade rmccue/requests to 1.8.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 rmccue/requests

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-29476, inspect your project dependencies for Rmccue/requests:

inspect dependencies for rmccue/requests

Analyze the terminal output to locate any version of Rmccue/requests in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Rmccue/requests, 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 Unserialization of untrusted data. ### Patches The issue has been patched and users of `Requests` 1.6.0, 1.6.1 and 1.7.0 should update to version 1.8.0. ### References Publications about the vulnerability: * https://dannewitz.ninja/posts/php-unserialize-object-injection-yet-another-stars-rating-wordpress * https://github.com/ambionics/phpggc/issues/52 * https://blog.detectify.com/2019/07/23/improving-wordpress-plugin-security/ * https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdf * https://cdn2.hubspot.net/hubfs/3853213/us-18-Thomas-It%27s-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-....pdf * https://2018.zeronights.ru/wp-content/uploads/materials/9%20ZN2018%20WV%20-%20PHP%20unserialize.pdf * https://medium.com/@knownsec404team/extend-the-attack-surface-of-php-deserialization-vulnerability-via-phar-d6455c6a1066#3c0f Originally fixed in WordPress 5.5.2: * https://github.com/WordPress/wordpress-develop/commit/add6bedf3a53b647d0ebda2970057912d3cd79d3 * https://wordpress.org/news/2020/10/wordpress-5-5-2-security-and-maintenance-release/ Related Security Advisories: * https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-28032 * https://nvd.nist.gov/vuln/detail/CVE-2020-28032 Notification to the Requests repo including a fix in: * https://github.com/rmccue/Requests/pull/421 and * https://github.com/rmccue/Requests/pull/422 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Request](https://github.com/WordPress/Requests/)

CVE-2021-29476 Affected Rmccue/requests Versions

1 component(s)
Fixed Versions:
1.8.0
Product / Package Ecosystem Affected Versions Fixed Version
rmccue/requests
Packagist
≥ 1.6.0
< 1.8.0
1.8.0

References

GitHub Advisory / Wiki ADVISORY
https://github.com/WordPress/Requests/security/advisories/GHSA-52qp-jpq7-6c54
NVD — CVE-2021-29476 NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-29476
Rmccue/requests Source Repository REPOSITORY
https://github.com/ambionics/phpggc/issues/52
Rmccue/requests Source Repository REPOSITORY
https://github.com/rmccue/Requests/pull/421
Security Fix Commit FIX COMMIT
https://github.com/WordPress/wordpress-develop/commit/add6bedf3a53b647d0ebda2970057912d3cd79d3
2018.zeronights.ru/wp-content/uploads/... WEB
https://2018.zeronights.ru/wp-content/uploads/materials/9%20ZN2018%20WV%20-%20PHP%20unserialize.pdf
Rmccue/requests Security Information SECURITY
https://blog.detectify.com/2019/07/23/improving-wordpress-plugin-security
cdn2.hubspot.net/hubfs/3853213/us-18... WEB
https://cdn2.hubspot.net/hubfs/3853213/us-18-Thomas-It%27s-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-....pdf
dannewitz.ninja/posts/php-unseriali... WEB
https://dannewitz.ninja/posts/php-unserialize-object-injection-yet-another-stars-rating-wordpress
Rmccue/requests Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/rmccue/requests/CVE-2021-29476.yaml
i.blackhat.com/us-18/thu-august-9/... WEB
https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdf
medium.com/@knownsec404team/ex... WEB
https://medium.com/@knownsec404team/extend-the-attack-surface-of-php-deserialization-vulnerability-via-phar-d6455c6a1066#3c0f
Rmccue/requests Release RELEASE
https://wordpress.org/news/2020/10/wordpress-5-5-2-security-and-maintenance-release

Frequently Asked Questions

What is CVE-2021-29476?
CVE-2021-29476 is a security vulnerability in Rmccue/requests involving Insecure Deserialization of untrusted data in rmccue/requests under CWE-502: Deserialization of Untrusted Data.
Which Rmccue/requests versions are affected?
Affected versions include releases prior to 1.8.0 across affected packages: rmccue/requests.
What version fixes CVE-2021-29476?
Upgrading to 1.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rmccue/requests affected?
Yes, rmccue/requests is affected in releases prior to 1.8.0. Upgrade your dependency to 1.8.0 or later.
What is the CVSS score of CVE-2021-29476?
CVE-2021-29476 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-29476?
CVE-2021-29476 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Packagist dependencies for CVE-2021-29476?
Run the dependency tree command: 'inspect dependencies for rmccue/requests'. 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-52qp-jpq7-6c54",
  "modified" : "2021-04-27T20:54:56Z",
  "published" : "2021-04-29T21:52:30Z",
  "aliases" : [ "CVE-2021-29476" ],
  "summary" : "Insecure Deserialization of untrusted data in rmccue/requests",
  "details" : "### Impact\nUnserialization of untrusted data.\n\n### Patches\nThe issue has been patched and users of `Requests` 1.6.0, 1.6.1 and 1.7.0 should update to version 1.8.0.\n\n### References\nPublications about the vulnerability:\n* https://dannewitz.ninja/posts/php-unserialize-object-injection-yet-another-stars-rating-wordpress\n* https://github.com/ambionics/phpggc/issues/52\n* https://blog.detectify.com/2019/07/23/improving-wordpress-plugin-security/\n* https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdf\n* https://cdn2.hubspot.net/hubfs/3853213/us-18-Thomas-It%27s-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-....pdf\n* https://2018.zeronights.ru/wp-content/uploads/materials/9%20ZN2018%20WV%20-%20PHP%20unserialize.pdf\n* https://medium.com/@knownsec404team/extend-the-attack-surface-of-php-deserialization-vulnerability-via-phar-d6455c6a1066#3c0f\n\nOriginally fixed in WordPress 5.5.2:\n* https://github.com/WordPress/wordpress-develop/commit/add6bedf3a53b647d0ebda2970057912d3cd79d3\n* https://wordpress.org/news/2020/10/wordpress-5-5-2-security-and-maintenance-release/\n\nRelated Security Advisories:\n* https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-28032\n* https://nvd.nist.gov/vuln/detail/CVE-2020-28032\n\nNotification to the Requests repo including a fix in:\n* https://github.com/rmccue/Requests/pull/421 and\n* https://github.com/rmccue/Requests/pull/422\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Request](https://github.com/WordPress/Requests/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "rmccue/requests"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0"
      }, {
        "fixed" : "1.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/Requests/security/advisories/GHSA-52qp-jpq7-6c54"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29476"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ambionics/phpggc/issues/52"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rmccue/Requests/pull/421"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/wordpress-develop/commit/add6bedf3a53b647d0ebda2970057912d3cd79d3"
  }, {
    "type" : "WEB",
    "url" : "https://2018.zeronights.ru/wp-content/uploads/materials/9%20ZN2018%20WV%20-%20PHP%20unserialize.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://blog.detectify.com/2019/07/23/improving-wordpress-plugin-security"
  }, {
    "type" : "WEB",
    "url" : "https://cdn2.hubspot.net/hubfs/3853213/us-18-Thomas-It%27s-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-....pdf"
  }, {
    "type" : "WEB",
    "url" : "https://dannewitz.ninja/posts/php-unserialize-object-injection-yet-another-stars-rating-wordpress"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/rmccue/requests/CVE-2021-29476.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@knownsec404team/extend-the-attack-surface-of-php-deserialization-vulnerability-via-phar-d6455c6a1066#3c0f"
  }, {
    "type" : "WEB",
    "url" : "https://wordpress.org/news/2020/10/wordpress-5-5-2-security-and-maintenance-release"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-27T20:54:56Z",
    "nvd_published_at" : "2021-04-27T21:15:00Z"
  }
}