# CVE-2022-46157: Remote php code execution in Akeneo PIM

> Authenticated attackers can execute arbitrary PHP code by uploading crafted images, requiring Apache configuration changes for mitigation.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Dec 2022
- **Updated:** 22 Apr 2025
- **Also known as:** BIT-akeneo-2022-46157, GHSA-w9wc-4xcq-8gr6

## What is CVE-2022-46157?

CVE-2022-46157 is a high-severity vulnerability in akeneo pim-community-dev, published on 9 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Akeneo PIM is an open source Product Information Management (PIM). Akeneo PIM Community Edition versions before v5.0.119 and v6.0.53 allows remote authenticated users to execute arbitrary PHP code on the server by uploading a crafted image. Akeneo PIM Community Edition after the versions aforementioned provides patched Apache HTTP server configuration file, for docker setup and in documentation sample, to fix this vulnerability.   Community Edition users must change their Apache HTTP server configuration accordingly to be protected. The patch for Cloud Based Akeneo PIM Services customers has been applied since 30th October 2022. Users are advised to upgrade. Users unable to upgrade may  Replace any reference to `<FilesMatch \.php$>` in their apache httpd configurations with: `<Location "/index.php">`.

Weakness: CWE-94 (Improper Control of Generation of Code)

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

5 open source packages ship an affected version, including akeneo/pim-community-dev and akeneo. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `akeneo/pim-community-dev` | Packagist | All versions | 5.0.119 |
| `akeneo/pim-community-dev` | Packagist | All versions | 5.0.119 |
| `akeneo/pim-community-dev` | Packagist | From 6.0.0 | 6.0.53 |
| `akeneo/pim-community-dev` | Packagist | From 6.0.0 | 6.0.53 |
| `akeneo` | Bitnami | All versions | 5.0.119, 6.0.53 |

Products: Akeneo Product Information Management.

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

Upgrade akeneo/pim-community-dev to a fixed version for your release line: 5.0.119 or 6.0.53.

## Is CVE-2022-46157 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46157 exists.

## Other vulnerabilities in akeneo pim-community-dev

- [CVE-2017-1000009](https://insights.sbomify.com/CVE-2017-1000009/): Akeneo PIM vulnerable to shell injection in the mass edition (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-46157 is a high-severity vulnerability in akeneo pim-community-dev, published on 9 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46157 exists.

Affected packages and fixed versions:
- akeneo/pim-community-dev (Packagist): affected all versions; fixed in 5.0.119
- akeneo/pim-community-dev (Packagist): affected all versions; fixed in 5.0.119
- akeneo/pim-community-dev (Packagist): affected from 6.0.0; fixed in 6.0.53
- akeneo/pim-community-dev (Packagist): affected from 6.0.0; fixed in 6.0.53
- akeneo (Bitnami): affected all versions; fixed in 5.0.119, 6.0.53

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

## Sources

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

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