CVE DatabaseCVE-2016-4437
한국어 권고문 →
CVE-2016-44379.8/CRITICALCISA KEVCWE-321

Apache Shiro RememberMe Default Cipher Key Remote Code Execution Vulnerability (CVE-2016-4437)

⚡ Jump to Patch
Affected Vendors
apache
Affected Components
shiro
Published Date
2016-06-07
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
93.0%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All Java applications utilizing Apache Shiro versions prior to 1.2.5

Impact

Remote attackers can leverage the hardcoded default AES encryption key to send malicious serialized objects, leading to arbitrary code execution (RCE) or access control bypass

Mitigation

Immediately upgrade Apache Shiro to version 1.2.5 or higher, and explicitly configure a unique, secure random cipher key for the RememberMe service

Affected Products & Version Scope

Apache Shiro versions prior to 1.2.5 (including 1.2.4 and earlier)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The most effective remediation is to upgrade Apache Shiro to a secure version (1.2.5 or higher). Update your Maven or Gradle build configuration files as shown below.

xml
<!-- Maven pom.xml Update Example -->
<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-core</artifactId>
    <version>1.2.5</version> <!-- Latest stable version recommended -->
</dependency>
<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-web</artifactId>
    <version>1.2.5</version>
</dependency>

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, you must programmatically force the RememberMe manager to generate and use a unique, cryptographically secure random key at runtime.

java
// Java Configuration Workaround Example
@Bean
public SimpleCookie rememberMeCookie() {
    SimpleCookie cookie = new SimpleCookie('rememberMe');
    cookie.setHttpOnly(true);
    cookie.setMaxAge(31536000); // 1 year
    return cookie;
}

@Bean
public CookieRememberMeManager rememberMeManager() {
    CookieRememberMeManager manager = new CookieRememberMeManager();
    manager.setCookie(rememberMeCookie());
    // Generate a secure random 128-bit AES key instead of using the default hardcoded key
    byte cipherKey = org.apache.shiro.crypto.AesCipherService.generateNewKey(128).getEncoded();
    manager.setCipherKey(cipherKey);
    return manager;
}

3. Log Audit & IoC Verification Commands

Inspect server logs for requests containing unusually long and complex Base64 strings in the 'rememberMe' cookie. Use the following shell commands to audit logs for suspicious deserialization exceptions.

bash
# Search for rememberMe cookie patterns in Nginx or WAS access logs
grep -i 'rememberMe=' /var/log/nginx/access.log | head -n 20

# Audit application logs for Shiro deserialization errors and exceptions
grep -Ei 'principalcollection|rememberme|deserialization' /var/log/tomcat*/catalina.out
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
Immediately upgrade Apache Shiro to version 1.2.5 or higher, and ensure that no hardcoded cipher keys are used in your application configuration.

Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds

Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2016-4437) resides in the 'RememberMe' feature of the Apache Shiro framework. To maintain user sessions, Apache Shiro serializes, encrypts, and encodes identity information into a cookie. However, in versions prior to 1.2.5, Shiro used a hardcoded default AES cipher key ('kPH+bIxk5D2deZiIxcaaaA==') within its source code. This allows attackers to easily obtain the encryption key used by the framework (CWE-321).

2. Exploitation Mechanics & Attack Scenario

An attacker encrypts a malicious Java serialized payload (e.g., a gadget chain generated via CommonsCollections) using the known default AES key. The encrypted payload is then sent to the target application within the 'rememberMe' cookie of an HTTP request. Upon receiving the request, the application decrypts the cookie using the hardcoded default key and deserializes the payload. This deserialization process triggers the execution of the malicious object, granting the attacker arbitrary command execution under the application's privileges.

3. Infrastructure & Business Impact

With a CVSS score of 9.8 (Critical) and its inclusion in the CISA KEV catalog, this vulnerability is actively exploited in the wild. It allows unauthenticated remote attackers to gain full control over the host system. This can lead to database credential theft, lateral movement within the internal network, ransomware deployment, and complete disruption of business services.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2016-4437)

FAQ

Q1. How critical is CVE-2016-4437 and is it actively exploited in the wild?

CVE-2016-4437 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 93.0%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2016-4437?

Primary impacted vendors include apache across shiro. Scope summary: Apache Shiro versions prior to 1.2.5 (including 1.2.4 and earlier)

Q3. What temporary mitigations or workarounds exist for CVE-2016-4437 before patching?

[Mitigation] Immediately upgrade Apache Shiro to version 1.2.5 or higher, and explicitly configure a unique, secure random cipher key for the RememberMe service Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2016-4437

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (apache)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2016-4437 Apache Shiro RememberMe Default Cipher Key Remote Code Execution Vulnerability (CVE-2016-4437) (CVSS 9.8) - Patch & Workaround | CVE Pulse