CVE-2017-1000486 — Primetek Primefaces Remote Code Execution Vulnerability

CVE-2017-1000486

PrimeFaces JSF Component Library — Hardcoded Blowfish Key in ViewState Encryption Enables Server-Side EL Injection RCE; CRITICAL 9.8; Added KEV January 2022

What Is PrimeFaces?

PrimeFaces is a popular open-source JSF (JavaServer Faces) component library for Java web applications, widely used in enterprise Java EE and Jakarta EE environments. PrimeFaces provides rich UI components — data grids, file uploaders, calendars, charts — used by applications at banks, government agencies, and large enterprises. JSF applications rely on a ViewState mechanism to preserve UI component state between requests. PrimeFaces encrypts this ViewState to prevent tampering; however, the encryption implementation in vulnerable versions used a hardcoded, publicly known key — creating a trivially exploitable path from ViewState manipulation to server-side code execution.

Overview

Actively Exploited. This vulnerability has been added to CISA's Known Exploited Vulnerabilities (KEV) Catalog on January 10, 2022. Federal agencies are required to apply mitigations per BOD 22-01.

CVE-2017-1000486 is a critical remote code execution vulnerability in PrimeFaces (versions 5.x through 6.0 before patch) caused by use of a hardcoded, publicly known Blowfish encryption key ("primefaces") to encrypt the ViewState parameter. An unauthenticated remote attacker who knows this key — which is literally hardcoded in the public source code — can craft a malicious ViewState containing Java Expression Language (EL) expressions; when the server decrypts and processes the ViewState, the EL expressions are evaluated server-side, executing arbitrary Java code. CISA added CVE-2017-1000486 to the KEV catalog in January 2022.

Affected Versions

PrimeFaces Version Status
PrimeFaces 5.x before 5.2.21 / 5.3.8 Vulnerable
PrimeFaces 6.0 before 6.0.1 Vulnerable
PrimeFaces 5.2.21, 5.3.8, 6.0.1 and later Fixed (requires strong key configuration)

Technical Details

Root Cause: Hardcoded Encryption Key Enables ViewState EL Injection

CVE-2017-1000486 is an inadequate encryption strength vulnerability (CWE-326) with a practical impact of server-side code injection. The attack chain is:

  1. Hardcoded key: PrimeFaces 5.x/6.0 used Blowfish encryption with the hardcoded key "primefaces" to encrypt the JSF ViewState. This key is in the public source code and known to any attacker.

  2. ViewState tampering: An attacker crafts a malicious ViewState by encrypting arbitrary content with the known Blowfish key. The malicious ViewState contains Java EL (Expression Language) expressions in the partial response action or component state.

  3. Server-side EL evaluation: When the server receives the crafted ViewState, it decrypts it with the same hardcoded key, then evaluates the EL expressions in the server-side JSF processing cycle. EL expressions in JSF have access to the runtime environment and can invoke arbitrary Java methods.

  4. Code execution: The EL injection can invoke Runtime.exec() or other Java runtime methods to execute arbitrary OS commands on the server, achieving full RCE as the application server user.

Why this is CVSS 9.8 (Critical):

  • PR:N, UI:N — any unauthenticated HTTP client can trigger the exploit
  • No special knowledge required beyond the publicly known key
  • Works against any PrimeFaces application using the default configuration

Attack Characteristics

Attribute Detail
Attack Vector Network — HTTP request with crafted ViewState
Authentication None required
Prerequisites Target application uses PrimeFaces with default key
Payload EL expression in encrypted ViewState
Impact RCE as application server process user

Discovery

The hardcoded key was identified through code review of the PrimeFaces open-source repository. The fix requires application administrators to configure a custom encryption key in web.xml — the framework itself cannot auto-generate a unique key per installation.

Exploitation Context

  • Enterprise Java attack surface: PrimeFaces is deployed in enterprise financial, healthcare, and government applications — environments with high-value data; a CRITICAL unauthenticated RCE in a widely-used Java UI library attracts significant attacker attention
  • Zero-configuration exploitability: Because the key is hardcoded in public source code, exploiting CVE-2017-1000486 requires no reconnaissance — an attacker can identify the framework (via HTTP response headers or error pages) and immediately send the crafted ViewState
  • Persistence after "fix": The patch requires administrators to explicitly set a strong key in web.xml; applications that were upgraded without reading the security advisory continued using the default key, leaving many deployments vulnerable long after the fix was available
  • CISA KEV (2022): Added January 2022 confirming active exploitation of unpatched PrimeFaces applications

Remediation

CISA BOD 22-01 Deadline: July 10, 2022. Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
  1. Upgrade PrimeFaces — update to PrimeFaces 5.2.21, 5.3.8, or 6.0.1+ immediately.

  2. Configure a strong encryption key — after upgrading, add a custom encryption key in web.xml. The fix alone is not sufficient without configuring the key:

    <context-param>
      <param-name>primefaces.SECRET</param-name>
      <param-value>[your-random-strong-key]</param-value>
    </context-param>
    
  3. Inventory PrimeFaces deployments — scan your Java application portfolio for PrimeFaces usage; the library is often included as a dependency by third-party applications and may not be immediately visible.

  4. Apply WAF rules — web application firewall rules can detect malformed or unusually large ViewState parameters that may indicate exploitation attempts.

  5. Run application servers as least-privilege accounts — if exploitation occurs, limiting the application server's OS permissions reduces the blast radius of arbitrary code execution.

Key Details

PropertyValue
CVE ID CVE-2017-1000486
Vendor / Product Primetek — Primefaces Application
NVD Published2018-01-03
NVD Last Modified2025-11-05
CVSS 3.1 Score9.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SeverityCRITICAL
CWE CWE-326 — Inadequate Encryption Strength find similar ↗
CISA KEV Added2022-01-10
CISA KEV Deadline2022-07-10
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2022-07-10. Apply updates per vendor instructions.

Timeline

DateEvent
2016-09-01PrimeFaces releases 5.2.21, 5.3.8, and 6.0.1 with a fix requiring configuration of a strong encryption key
2018-01-03CVE-2017-1000486 published by NVD
2022-01-10Added to CISA Known Exploited Vulnerabilities catalog
2022-07-10CISA BOD 22-01 remediation deadline