# CVE-2022-25275: Drupal core Information Disclosure vulnerability

> Attackers can access non-public image files if insecure derivative settings are enabled, requiring a patch to enforce proper access checks.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Apr 2023
- **Updated:** 3 Feb 2025
- **Also known as:** BIT-drupal-2022-25275, DRUPAL-CORE-2022-012, GHSA-xh3v-6f9j-wxw3, UBUNTU-CVE-2022-25275

## What is CVE-2022-25275?

CVE-2022-25275 is a high-severity missing authorization vulnerability in Drupal Drupal, published on 26 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

## Which versions are affected by CVE-2022-25275?

8 open source packages ship an affected version, including drupal/core and drupal. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `drupal/core` | Packagist | From 7.0.0 | 7.91 |
| `drupal/core` | Packagist | From 7.0.0 | 7.91 |
| `drupal/core` | Packagist | From 8.0.0 | 9.3.19, 9.4.3 |
| `drupal/core` | Packagist | From 8.0.0 | 9.3.19 |
| `drupal/core` | Packagist | From 8.0.0 | 9.3.19 |
| `drupal/core` | Packagist | From 9.4.0 | 9.4.3 |
| `drupal/core` | Packagist | From 9.4.0 | 9.4.3 |
| `drupal` | Bitnami | From 7.0.0 | 7.91.0, 9.3.19, 9.4.3 |

Products: Drupal Drupal.

## How do I fix CVE-2022-25275?

Upgrade drupal/core to a fixed version for your release line: 7.91, 9.3.19 or 9.4.3.

## Is CVE-2022-25275 being exploited?

There is no known exploitation of CVE-2022-25275 in the wild and no public exploit code.

## Other vulnerabilities in Drupal Drupal

- [CVE-2026-9082](https://insights.sbomify.com/CVE-2026-9082/): Drupal Core SQL Injection (critical 9.8, exploited in the wild)
- [CVE-2020-13671](https://insights.sbomify.com/CVE-2020-13671/): Drupal core Un-restricted Upload of File (high 8.8, exploited in the wild)
- [CVE-2019-6340](https://insights.sbomify.com/CVE-2019-6340/): Drupal Core Remote Code Execution (high 8.1, exploited in the wild)
- [CVE-2009-3352](https://insights.sbomify.com/CVE-2009-3352/): Other in n/a (critical 10.0)
- [CVE-2024-55636](https://insights.sbomify.com/CVE-2024-55636/): Drupal core - Less critical - Gadget chain - SA-CORE-2024-006 (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-25275 and fix it if it is affected.

What it is: CVE-2022-25275 is a high-severity missing authorization vulnerability in Drupal Drupal, published on 26 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-25275 in the wild and no public exploit code.

Affected packages and fixed versions:
- drupal/core (Packagist): affected from 7.0.0; fixed in 7.91
- drupal/core (Packagist): affected from 7.0.0; fixed in 7.91
- drupal/core (Packagist): affected from 8.0.0; fixed in 9.3.19, 9.4.3
- drupal/core (Packagist): affected from 8.0.0; fixed in 9.3.19
- drupal/core (Packagist): affected from 8.0.0; fixed in 9.3.19
- drupal/core (Packagist): affected from 9.4.0; fixed in 9.4.3
- drupal/core (Packagist): affected from 9.4.0; fixed in 9.4.3
- drupal (Bitnami): affected from 7.0.0; fixed in 7.91.0, 9.3.19, 9.4.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-25275/ (Markdown: https://insights.sbomify.com/CVE-2022-25275/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-25275
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-25275
- OSV: https://osv.dev/vulnerability/CVE-2022-25275

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-25275/
Summaries are generated and may contain mistakes; the official description above is the record.
