Apache Shiro RememberMe Default Cipher Key Remote Code Execution Vulnerability (CVE-2016-4437)
Executive & SecOps Summary
SECOPS ASSESSMENTAll Java applications utilizing Apache Shiro versions prior to 1.2.5
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
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
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. 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.
<!-- 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 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.
# 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.outScan 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.
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
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.
Frequently Asked SecOps Questions (CVE-2016-4437)
FAQQ1. 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.
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.
🔗 Related Advisories in Similar Stack (apache)
View Category →Apache MINA 3.0 JavaNativeMessageDecoder Deserialization Remote Code Execution Vulnerability (CVE-2026-118636)
[Affected Scope] Inactive Apache MINA 3.0.0 branch and applications utilizing its codec module
Apache Thrift Java Bindings Uncontrolled Recursion Denial of Service Vulnerability (CVE-2026-120135)
[Affected Scope] Java-based applications and services utilizing Apache Thrift versions prior to 0.24.0
Apache ActiveMQ Jolokia JMX-HTTP Bridge Remote Code Execution Vulnerability Advisory (CVE-2026-34197)
[Affected Scope] Apache ActiveMQ Classic versions prior to 5.19.4, and 6.0.0 through 6.2.3
Apache Tomcat EncryptInterceptor Bypass and Sensitive Data Exposure Vulnerability (CVE-2026-34486)
[Affected Scope] Apache Tomcat versions 11.0.20, 10.1.53, and 9.0.116 utilizing clustering with EncryptInterceptor enabled
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.