exploit August 19, 2026 · 4 min read

Perfex CRM ≤ 3.4.x: Unauthenticated RCE via Cookie Deserialization

The Perfex CRM research repository documents an unauthenticated remote code execution chain caused by unsafe deserialization of the autologin cookie. The chain abuses attacker-controlled serialized data and a gadget capable of writing arbitrary content to a filesystem path.

Y Yucaerin
Perfex CRM ≤ 3.4.x: Unauthenticated RCE via Cookie Deserialization

Introduction

The Perfex CRM research repository documents an unauthenticated remote code execution chain caused by unsafe deserialization of the autologin cookie. The chain abuses attacker-controlled serialized data and a gadget capable of writing arbitrary content to a filesystem path.

A public security-research repository documents the technical findings and proof-of-concept material associated with the issue. The discussion below focuses on the security impact, root cause, affected component, and defensive remediation rather than reproducing weaponized exploitation steps.

Vulnerability Overview

The vulnerable authentication flow passes user-controlled cookie data into PHP deserialization. When a suitable gadget chain is available in the application's dependencies, object destruction can reach a file-writing operation using attacker-controlled values.

In simplified terms, the security problem looks like this:

Unauthenticated Request
        │
        ▼
User-controlled autologin Cookie
        │
        ▼
Unsafe PHP Deserialization
        │
        ▼
Gadget Chain
        │
        ▼
Arbitrary File Write
        │
        ▼
Potential RCE

The important security principle is that untrusted client input must never be allowed to cross an authentication, authorization, filesystem, or code-execution boundary without strict server-side validation.

Why Is This Vulnerability Serious?

Unsafe deserialization is a high-impact vulnerability class because attacker-controlled serialized objects can trigger unexpected application behavior before authentication is established.

The potential impact depends on the application's configuration, the privileges of the affected process, and whether vulnerable functionality is exposed to untrusted users.

Root Cause

The root cause is CWE-502: untrusted data is deserialized as PHP objects. Authentication cookies should use safe, integrity-protected formats and must never be passed directly to unserialize().

A secure implementation should independently verify:

  • Authentication and authorization requirements
  • The ownership or scope of the requested object
  • Input type, format, and allowed values
  • Filesystem paths and canonical destinations where applicable
  • File type and content where uploads are involved
  • That privileged operations cannot be selected through client-controlled parameters
  • That sensitive functionality fails closed when validation fails

Affected Versions / Components

The publicly documented affected details are:

Component Details
Product Perfex CRM
Vulnerable versions ≤ 3.4.x
Vulnerability Unauthenticated PHP Object Deserialization → RCE
CWE CWE-502
CVE Not assigned in repository

These details are based on the public research repository and, where available, the corresponding NVD record. Administrators should verify the exact installed version and deployment configuration before determining exposure.

Public PoC

The associated repository contains research and proof-of-concept material demonstrating the vulnerability.

For defensive research, proof-of-concept code should only be used in an authorized laboratory environment or against systems for which explicit permission has been granted. Production systems should be tested using harmless validation methods whenever possible.

Security Impact

1. Remote code execution

Remote code execution can become a security concern depending on the deployment and the privileges of the affected component.

2. Arbitrary file write

Arbitrary file write can become a security concern depending on the deployment and the privileges of the affected component.

3. Application compromise

Application compromise can become a security concern depending on the deployment and the privileges of the affected component.

4. Potential server compromise

Potential server compromise can become a security concern depending on the deployment and the privileges of the affected component.

Detection and Mitigation

Administrators should first identify whether the affected component is installed and determine the exact version.

Recommended defensive actions include:

  • Upgrade to a fixed Perfex release when available.
  • Eliminate unsafe deserialization of user-controlled cookies.
  • Use authenticated, signed session mechanisms.
  • Review dependencies for unsafe gadget chains.
  • Invalidate existing authentication cookies after remediation.

Indicators of Compromise

For incident-response purposes, administrators should review application and web-server logs around the affected functionality.

A useful investigation should examine:

Application / Web Logs
        │
        ├── Unusual Requests to Vulnerable Functions
        ├── Unexpected Authentication Events
        ├── Suspicious File Operations
        ├── Unexpected Account / Role Changes
        ├── Recently Modified Files
        └── Unusual Outbound Connections

Log evidence should be correlated with account activity, filesystem changes, deployment history, and application configuration rather than treated as a single definitive indicator.

Conclusion

The Perfex CRM research repository documents an unauthenticated remote code execution chain caused by unsafe deserialization of the autologin cookie. The chain abuses attacker-controlled serialized data and a gadget capable of writing arbitrary content to a filesystem path.

The main lesson is that security-sensitive functionality must enforce authorization and validation on the server side. Client-controlled identifiers, role values, filenames, MIME types, filesystem paths, and template content should never be trusted simply because they originated from an apparently legitimate application workflow.

For security researchers and developers, this issue provides a useful case study in secure application design, particularly around authorization boundaries, file handling, authentication, input validation, and defense-in-depth.

SOURCE: https://github.com/Yucaerin/Perfex-CRM-3.4.x-Unauthenticated-RCE-via-Cookie-Deserialization

References:

  • No separate CVE reference was identified in the public repository.