CVE-2021-24374: Automattic/jetpack Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-5hr6-r8h6-wh22
CVSS 5.3
CWE-668 CWE-284 CWE-639
Published
Advisory Summary

CVE-2021-24374 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Automattic/jetpack libraries in the Packagist ecosystem. The issue involves jetpack exposure of resource to wrong sphere. Remediation is available by upgrading affected packages to version 9.8.

CVE-2021-24374 at a Glance

CVE Identifier CVE-2021-24374
GHSA Identifier GHSA-5hr6-r8h6-wh22
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Automattic/jetpack
Package Ecosystem Packagist
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:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/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 None (I:N)
Availability None (A:N)

How to Fix CVE-2021-24374

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

automattic/jetpack fixed: 9.8
Upgrade automattic/jetpack to 9.8
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 automattic/jetpack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-24374, inspect your project dependencies for Automattic/jetpack:

inspect dependencies for automattic/jetpack

Analyze the terminal output to locate any version of Automattic/jetpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.8), 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Automattic/jetpack, 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 Jetpack Carousel module of the JetPack WordPress plugin before 9.8 allows users to create a "carousel" type image gallery and allows users to comment on the images. A security vulnerability was found within the Jetpack Carousel module by nguyenhg_vcs that allowed the comments of non-published page/posts to be leaked.

CVE-2021-24374 Affected Automattic/jetpack Versions

1 component(s)
Fixed Versions:
9.8
Product / Package Ecosystem Affected Versions Fixed Version
automattic/jetpack
Packagist
< 9.8
9.8

References

Frequently Asked Questions

What is CVE-2021-24374?
CVE-2021-24374 is a security vulnerability in Automattic/jetpack involving JetPack Exposure of Resource to Wrong Sphere under CWE-668: Exposure of Resource to Wrong Sphere.
Which Automattic/jetpack versions are affected?
Affected versions include releases prior to 9.8 across affected packages: automattic/jetpack.
What version fixes CVE-2021-24374?
Upgrading to 9.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is automattic/jetpack affected?
Yes, automattic/jetpack is affected in releases prior to 9.8. Upgrade your dependency to 9.8 or later.
What is the CVSS score of CVE-2021-24374?
CVE-2021-24374 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-24374?
CVE-2021-24374 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check Packagist dependencies for CVE-2021-24374?
Run the dependency tree command: 'inspect dependencies for automattic/jetpack'. 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-5hr6-r8h6-wh22",
  "modified" : "2024-04-23T17:09:16Z",
  "published" : "2022-05-24T19:05:47Z",
  "aliases" : [ "CVE-2021-24374" ],
  "summary" : "JetPack Exposure of Resource to Wrong Sphere",
  "details" : "The Jetpack Carousel module of the JetPack WordPress plugin before 9.8 allows users to create a \"carousel\" type image gallery and allows users to comment on the images. A security vulnerability was found within the Jetpack Carousel module by nguyenhg_vcs that allowed the comments of non-published page/posts to be leaked.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "automattic/jetpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-24374"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Automattic/jetpack-production"
  }, {
    "type" : "WEB",
    "url" : "https://jetpack.com/2021/06/01/jetpack-9-8-engage-your-audience-with-wordpress-stories"
  }, {
    "type" : "WEB",
    "url" : "https://wpscan.com/vulnerability/08a8a51c-49d3-4bce-b7e0-e365af1d8f33"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284", "CWE-639", "CWE-668" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-23T17:09:16Z",
    "nvd_published_at" : "2021-06-21T20:15:00Z"
  }
}