# CVE-2026-42298: Postiz: Arbitrary Code Execution and Token Exfiltration in pr-docker-build.yml via untrusted Dockerfile.dev

> Attackers can execute arbitrary code and steal privileged tokens by submitting a malicious Pull Request with a modified Dockerfile in the Postiz repository.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/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:** 8 May 2026
- **Updated:** 11 May 2026
- **Also known as:** GHSA-v975-9h5p-xhm4

## What is CVE-2026-42298?

CVE-2026-42298 is a critical code injection vulnerability in gitroomhq postiz-app, published on 8 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Postiz is an AI social media scheduling tool. Prior to commit da44801, a "Pwn Request" vulnerability in the Build and Publish PR Docker Image workflow (.github/workflows/pr-docker-build.yml) allows any unauthenticated user to execute arbitrary code during the Docker build process and exfiltrate a highly privileged GITHUB_TOKEN (write-all permissions). This can be achieved simply by opening a Pull Request from a fork with a maliciously modified Dockerfile.dev. This issue has been patched via commit da44801.

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

## Which versions are affected by CVE-2026-42298?

It affects 1 product.


Products: Gitroom Postiz.

## How do I fix CVE-2026-42298?

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

## Is CVE-2026-42298 being exploited?

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

Public exploit code:

- Authorized security-research lab reproducing CVE-2026-42298 (pull_request_target docker-build RCE in pr-docker-build.yml) — flattened snapshot of gitroomhq/postiz-app (github_poc): https://github.com/pvharmo2/gha-lab-677752506e

## Other vulnerabilities in gitroomhq postiz-app

- [CVE-2026-42556](https://insights.sbomify.com/CVE-2026-42556/): Postiz stored XSS in public preview page (high 8.9)
- [CVE-2026-40487](https://insights.sbomify.com/CVE-2026-40487/): Postiz Has Unrestricted File Upload via MIME Type Spoofing that Leads to Stored XSS (high 8.9)
- [CVE-2026-34577](https://insights.sbomify.com/CVE-2026-34577/): Postiz: Unauthenticated Full-Read SSRF via /public/stream Endpoint with Trivially Bypassable Extension Check (high 8.6)
- [CVE-2026-34576](https://insights.sbomify.com/CVE-2026-34576/): Postiz: SSRF in upload-from-url endpoint allows fetching internal resources and cloud metadata (high 8.3)
- [CVE-2026-40168](https://insights.sbomify.com/CVE-2026-40168/): Postiz has Server-Side Request Forgery via Redirect Bypass in /api/public/stream (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42298 and fix it if it is affected.

What it is: CVE-2026-42298 is a critical code injection vulnerability in gitroomhq postiz-app, published on 8 May 2026. 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-2026-42298 in the wild and no public exploit code.

Affected product: gitroomhq postiz-app. 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-2026-42298/ (Markdown: https://insights.sbomify.com/CVE-2026-42298/index.md)
```

## Sources

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

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