CVE-2022-25275: Drupal/core Drupal Core Information Disclosure Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-xh3v-6f9j-wxw3
CVSS 7.5
Published
Advisory Summary

CVE-2022-25275 is a HIGH (CVSS 7.5) drupal core information disclosure vulnerability vulnerability (General Security Weakness) affecting Drupal/core libraries in the Packagist ecosystem. The issue involves drupal core information disclosure vulnerability. Remediation is available by upgrading affected packages to version 7.91, 9.3.19, 9.4.3.

CVE-2022-25275 at a Glance

CVE Identifier CVE-2022-25275
GHSA Identifier GHSA-xh3v-6f9j-wxw3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Drupal/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.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:H/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 High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2022-25275

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

drupal/core fixed: 7.91
Upgrade drupal/core to 7.91
drupal/core fixed: 9.3.19
Upgrade drupal/core to 9.3.19
drupal/core fixed: 9.4.3
Upgrade drupal/core to 9.4.3
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 drupal/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-25275, inspect your project dependencies for Drupal/core:

inspect dependencies for drupal/core

Analyze the terminal output to locate any version of Drupal/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.91), 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 General Security Weakness. In Drupal/core, 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

In some situations, the Image module does not correctly check access to image files not stored in the standard public files directory when generating derivative images using the image styles system. Access to a non-public file is checked only if it is stored in the "private" file system. However, some contributed modules provide additional file systems, or schemes, which may lead to this vulnerability. This vulnerability is mitigated by the fact that it only applies when the site sets (Drupal 9) `$config['image.settings']['allow_insecure_derivatives']` or (Drupal 7) `$conf['image_allow_insecure_derivatives']` to TRUE. The recommended and default setting is FALSE, and Drupal core does not provide a way to change that in the admin UI. Some sites may require configuration changes following this security release. Review the release notes for your Drupal version if you have issues accessing files or image styles after updating.

CVE-2022-25275 Affected Drupal/core Versions

3 component(s)
Fixed Versions:
7.919.3.199.4.3
Product / Package Ecosystem Affected Versions Fixed Version
drupal/core
Packagist
≥ 7.0.0
< 7.91
7.91
drupal/core
Packagist
≥ 8.0.0
< 9.3.19
9.3.19
drupal/core
Packagist
≥ 9.4.0
< 9.4.3
9.4.3

References

Frequently Asked Questions

What is CVE-2022-25275?
CVE-2022-25275 is a security vulnerability in Drupal/core involving Drupal core Information Disclosure vulnerability under General Security Weakness.
Which Drupal/core versions are affected?
Affected versions include releases prior to 7.91, 9.3.19, 9.4.3 across affected packages: drupal/core.
What version fixes CVE-2022-25275?
Upgrading to 7.91, 9.3.19, 9.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is drupal/core affected?
Yes, drupal/core is affected in releases prior to 7.91, 9.3.19, 9.4.3. Upgrade your dependency to 7.91, 9.3.19, 9.4.3 or later.
What is the CVSS score of CVE-2022-25275?
CVE-2022-25275 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-25275?
CVE-2022-25275 is classified under General Security Weakness.
How can I check Packagist dependencies for CVE-2022-25275?
Run the dependency tree command: 'inspect dependencies for drupal/core'. 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-xh3v-6f9j-wxw3",
  "modified" : "2023-05-09T16:17:47Z",
  "published" : "2022-08-06T05:31:26Z",
  "aliases" : [ "CVE-2022-25275" ],
  "summary" : "Drupal core Information Disclosure vulnerability",
  "details" : "In some situations, the Image module does not correctly check access to image files not stored in the standard public files directory when generating derivative images using the image styles system.\n\nAccess to a non-public file is checked only if it is stored in the \"private\" file system. However, some contributed modules provide additional file systems, or schemes, which may lead to this vulnerability.\n\nThis vulnerability is mitigated by the fact that it only applies when the site sets (Drupal 9) `$config['image.settings']['allow_insecure_derivatives']` or (Drupal 7) `$conf['image_allow_insecure_derivatives']` to TRUE. The recommended and default setting is FALSE, and Drupal core does not provide a way to change that in the admin UI.\n\nSome sites may require configuration changes following this security release. Review the release notes for your Drupal version if you have issues accessing files or image styles after updating.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "drupal/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.91"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "drupal/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "9.3.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "drupal/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.4.0"
      }, {
        "fixed" : "9.4.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25275"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/drupal/core/commit/2d5f47fc8a166115f56c2330a81e83abe22445cf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/drupal/core/commit/e2fbf63700819cb470a1be425798f1a3f2020116"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2022-25275.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/drupal/core"
  }, {
    "type" : "WEB",
    "url" : "https://www.drupal.org/sa-core-2022-012"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-06T05:31:26Z",
    "nvd_published_at" : "2023-04-26T14:15:09Z"
  }
}