# CVE-2026-12986: Payara Server Full has a Cross-Site Request Forgery vulnerability

> An SSRF and CSRF flaw in Payara Server allows attackers to steal admin tokens and gain full administrative control, leading to arbitrary code execution.

- **Severity:** High 7.3 (`CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P/S:P/AU:Y/R:U/V:C/RE:M/U:Amber`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 24 Jun 2026
- **Updated:** 24 Jun 2026
- **Also known as:** GHSA-x939-7fq5-v9v6

## What is CVE-2026-12986?

CVE-2026-12986 is a high-severity server-side request forgery vulnerability in Payara Server, published on 24 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

A critical vulnerability in Admin GUI in Payara Server Full 4.x, 5.x, 6.x, 7.x, 7.2026.x, 6.2025.x, 6.2024.x on All platforms that allows the attacker to leak the admin gfresttoken to an attacker-controlled host that can result in a full unauthenticated takeover of Payara admin domain.

A Server-Side Request Forgery (SSRF) vulnerability in the DownloadServlet of the Admin GUI in Payara Server allows a remote attacker to exfiltrate the administrator's REST session token (gfresttoken) to an attacker-controlled host via a crafted request URL. Combined with the absence of CSRF protection on DownloadServlet, an unauthenticated attacker can trick a logged-in administrator into triggering the token leak, then replay the stolen token to gain full administrative access to the Payara domain, leading to arbitrary code execution via WAR deployment. The vulnerability exists in the DownloadServlet and associated ContentSource implementations (LogViewerContentSource, LogFilesContentSource, LBConfigContentSource, ClientStubsContentSource) within the admingui:console-common module.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-352 (Cross-Site Request Forgery)

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

2 open source packages ship an affected version, including fish.payara.distributions:payara.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `fish.payara.distributions:payara` | Maven | From 4.0.0 | 7.2026.6 |
| `fish.payara.distributions:payara` | Maven | From 4.0.0 | 7.2026.6 |

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

Upgrade fish.payara.distributions:payara to 7.2026.6 or later.

## Is CVE-2026-12986 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-12986 is a high-severity server-side request forgery vulnerability in Payara Server, published on 24 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-12986 in the wild and no public exploit code.

Affected packages and fixed versions:
- fish.payara.distributions:payara (Maven): affected from 4.0.0; fixed in 7.2026.6
- fish.payara.distributions:payara (Maven): affected from 4.0.0; fixed in 7.2026.6

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

## Sources

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

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