# CVE-2020-7961: Liferay Portal Deserialization of Untrusted Data

> Remote attackers can execute arbitrary code via JSON web services due to unsafe deserialization in Liferay Portal.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 3 Nov 2021 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Mar 2020
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-w7pm-cc4v-f3g8

## What is CVE-2020-7961?

CVE-2020-7961 is a critical unsafe deserialization vulnerability in Liferay Liferay Portal, published on 20 Mar 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Deserialization of Untrusted Data in Liferay Portal prior to 7.2.1 CE GA2 allows remote attackers to execute arbitrary code via JSON web services (JSONWS).

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2020-7961?

2 open source packages ship an affected version, including com.liferay.portal:com.liferay.portal.kernel. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.liferay.portal:com.liferay.portal.kernel` | Maven | All versions | 4.35.3 |
| `com.liferay.portal:com.liferay.portal.kernel` | Maven | All versions | 4.35.3 |

Products: Liferay Liferay Portal.

## How do I fix CVE-2020-7961?

Upgrade com.liferay.portal:com.liferay.portal.kernel to 4.35.3 or later. US federal agencies must fix it by 3 May 2022.

## Is CVE-2020-7961 being exploited?

Yes. Attackers have exploited CVE-2020-7961 in the wild since at least 3 Nov 2021.

Public exploit code:

- https://github.com/mzer0one/CVE-2020-7961-POC (github_poc): https://github.com/mzer0one/CVE-2020-7961-POC
- Exploit script for CVE-2020-7961 (github_poc): https://github.com/ShutdownRepo/CVE-2020-7961
- Security research on Liferay CE 7.0.3 GA4: pre-auth RCE as root (CVE-2020-7961 class) reproduced end-to-end, plus 16 more findings — 8+ with no known CVE. Agentic loop-hunt: 25 generators, 22 judges, 9 live validators on Docker. Evidence trail + one-go checker included. (github_poc): https://github.com/dinosn/liferay-ga4-rce-research
- Deserialization of Untrusted Data in Liferay Portal prior to 7.2.1 CE GA2 allows remote attackers to execute arbitrary code via JSON web services (JSONWS) (github_poc): https://github.com/thelostworldFree/CVE-2020-7961-payloads
- CVE-2020–7961 Mass exploit for Script Kiddies (github_poc): https://github.com/CrackerCat/CVE-2020-7961-Mass
- Liferay Portal Java Unmarshalling via JSONWS RCE (metasploit)

## Other vulnerabilities in Liferay Liferay Portal

- [CVE-2021-33990](https://insights.sbomify.com/CVE-2021-33990/): File upload in n/a (critical 9.8)
- [CVE-2019-16891](https://insights.sbomify.com/CVE-2019-16891/): Liferay Portal Allows RCE via Deserialization of a JSON Payload (critical 9.8)
- [CVE-2023-47797](https://insights.sbomify.com/CVE-2023-47797/): Liferay Portal XSS with `p_l_back_url_title` on edit content page (critical 9.6)
- [CVE-2020-13445](https://insights.sbomify.com/CVE-2020-13445/): Liferay Portal and Liferay DXP Vulnerable to Arbitrary Code Execution (high 8.8)
- [CVE-2018-10795](https://insights.sbomify.com/CVE-2018-10795/): File upload in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-7961 and fix it if it is affected.

What it is: CVE-2020-7961 is a critical unsafe deserialization vulnerability in Liferay Liferay Portal, published on 20 Mar 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2020-7961 in the wild since at least 3 Nov 2021.

Affected packages and fixed versions:
- com.liferay.portal:com.liferay.portal.kernel (Maven): affected all versions; fixed in 4.35.3
- com.liferay.portal:com.liferay.portal.kernel (Maven): affected all versions; fixed in 4.35.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-2020-7961/ (Markdown: https://insights.sbomify.com/CVE-2020-7961/index.md)
```

## Sources

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

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