# CVE-2016-4437: Apache Shiro Code Execution

> Remote attackers can execute arbitrary code or bypass access restrictions in Apache Shiro if the remember-me cipher key is not configured.

- **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:** 7 Jun 2016
- **Updated:** 21 Oct 2025
- **Also known as:** DEBIAN-CVE-2016-4437, GHSA-p836-389h-j692, UBUNTU-CVE-2016-4437, USN-7139-1

## What is CVE-2016-4437?

CVE-2016-4437 is a critical vulnerability in n/a, published on 7 Jun 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Apache Shiro before 1.2.5, when a cipher key has not been configured for the "remember me" feature, allows remote attackers to execute arbitrary code or bypass intended access restrictions via an unspecified request parameter.

Weakness: CWE-321 (Use of Hard-coded Cryptographic Key)

## Which versions are affected by CVE-2016-4437?

2 open source packages ship an affected version, including org.apache.shiro:shiro-core. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.shiro:shiro-core` | Maven | All versions | 1.2.5 |
| `org.apache.shiro:shiro-core` | Maven | All versions | 1.2.5 |

Products: Apache Aurora, Apache Shiro, Redhat Fuse, Redhat Jboss Middleware Text-Only Advisories.

## How do I fix CVE-2016-4437?

Upgrade org.apache.shiro:shiro-core to 1.2.5 or later. US federal agencies must fix it by 3 May 2022.

## Is CVE-2016-4437 being exploited?

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

Public exploit code:

- CVE-2016-4437-Shiro反序列化爆破模块和key,命令执行，反弹shell的脚本 (github_poc): https://github.com/bkfish/Awesome_shiro
- 一个针对shiro反序列化漏洞(CVE-2016-4437)的快速利用工具/A simple tool targeted at shiro framework attacks with ysoserial. (github_poc): https://github.com/4nth0ny1130/shisoserial
- Python POC to Exploit CVE-2016-4437 Apache Shiro Deserialization Vulnerability Due to Hardcode Encryption Key (github_poc): https://github.com/pizza-power/CVE-2016-4437
- 这是基于cve-2016-4437简单的漏洞复现代码 (github_poc): https://github.com/35789-gh/cve-2016-4437
- Apache Shiro v1.2.4 Cookie RememberME Deserial RCE (metasploit)
- Apache Shiro 1.2.4 - Cookie RememberME Deserial RCE (Metasploit) (exploitdb)

## Other vulnerabilities in n/a

- [CVE-2024-27905](https://insights.sbomify.com/CVE-2024-27905/): Apache Aurora: padding oracle can allow construction an authentication cookie (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-4437 and fix it if it is affected.

What it is: CVE-2016-4437 is a critical vulnerability in n/a, published on 7 Jun 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2016-4437 in the wild since at least 3 Nov 2021.

Affected packages and fixed versions:
- org.apache.shiro:shiro-core (Maven): affected all versions; fixed in 1.2.5
- org.apache.shiro:shiro-core (Maven): affected all versions; fixed in 1.2.5

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

## Sources

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

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