# CVE-2023-6971: Code injection in Backup Migration

> Unauthenticated attackers can achieve remote code execution via Remote File Inclusion if PHP allow_url_include is enabled.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 23 Dec 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-4vhp-8vcj-r74x

## What is CVE-2023-6971?

CVE-2023-6971 is a high-severity code injection vulnerability in migrate Backup Migration, published on 23 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Backup Migration plugin for WordPress is vulnerable to Remote File Inclusion in versions 1.0.8 to 1.3.9 via the 'content-dir' HTTP header. This makes it possible for unauthenticated attackers to include remote files on the server, resulting in code execution. NOTE: Successful exploitation of this vulnerability requires that the target server's php.ini is configured with 'allow_url_include' set to 'on'. This feature is deprecated as of PHP 7.4 and is disabled by default, but can still be explicitly enabled in later versions of PHP.

Weakness: CWE-829 (Inclusion of Functionality from Untrusted Control Sphere)

## Which versions are affected by CVE-2023-6971?

It affects 1 product.


Products: Backupbliss Backup Migration.

## How do I fix CVE-2023-6971?

No fix has been published for CVE-2023-6971 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-6971 being exploited?

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

## Other vulnerabilities in migrate Backup Migration

- [CVE-2023-6972](https://insights.sbomify.com/CVE-2023-6972/): Backup Migration <= 1.3.9 - Unauthenticated Path Traversal to Arbitrary File Deletion (critical 9.8)
- [CVE-2023-6553](https://insights.sbomify.com/CVE-2023-6553/): Backup Migration <= 1.3.7 - Unauthenticated Remote Code Execution (critical 9.8)
- [CVE-2023-6266](https://insights.sbomify.com/CVE-2023-6266/): Backup Migration <= 1.3.6 - Unauthenticated Arbitrary Backup Download to Sensitive Information Exposure (high 7.5)
- [CVE-2023-6271](https://insights.sbomify.com/CVE-2023-6271/): Backup Migration Staging < 1.3.6 - Sensitive Data Exposure (high 7.5)
- [CVE-2023-7002](https://insights.sbomify.com/CVE-2023-7002/): Backup Migration <= 1.3.9 - Authenticated (Admin+) OS Command Injection via url (high 7.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-6971 and fix it if it is affected.

What it is: CVE-2023-6971 is a high-severity code injection vulnerability in migrate Backup Migration, published on 23 Dec 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-2023-6971 in the wild and no public exploit code.

Affected product: migrate Backup Migration. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2023-6971/ (Markdown: https://insights.sbomify.com/CVE-2023-6971/index.md)
```

## Sources

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

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