/

CVE-2026-45145

Severity:

HIGH RISK

(7.5)

Unsafe PHP Deserialization (CWE-502) in Chamilo LMS Core

CVE-2026-45145

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Chamilo LMS deserializes database values with PHP's native unserialize() without disabling object instantiation, allowing crafted serialized data to create arbitrary PHP objects. If an attacker can write such data to the affected career field, autoloaded gadget chains may execute operating-system commands as the web server user.

Chamilo LMS deserializes database values with PHP's native unserialize() without disabling object instantiation, allowing crafted serialized data to create arbitrary PHP objects. If an attacker can write such data to the affected career field, autoloaded gadget chains may execute operating-system commands as the web server user.

Affected context

The issue occurs in Chamilo LMS components that process the user_career.extra_data database field, including career-related library code and the CSV import cron path. Risk depends on whether an attacker can influence that stored value through another weakness, a compromised administrative workflow, or access to a lower-privilege management function, and whether exploitable gadget classes are available in the deployed runtime.

The issue occurs in Chamilo LMS components that process the user_career.extra_data database field, including career-related library code and the CSV import cron path. Risk depends on whether an attacker can influence that stored value through another weakness, a compromised administrative workflow, or access to a lower-privilege management function, and whether exploitable gadget classes are available in the deployed runtime.

Exploit preconditions

  • Attack surface: Chamilo LMS application and associated administrative or import workflows
  • Required access: Ability to write crafted serialized data to user_career.extra_data, directly or through a separate vulnerability
  • Trigger point: Processing of the affected database value by PHP's native unserialize() calls
  • Why exploitation is possible: Deserialization permits arbitrary PHP object instantiation, and autoloaded Symfony, Doctrine, or Monolog classes may provide usable property-oriented programming chains
  • Attack surface: Chamilo LMS application and associated administrative or import workflows
  • Required access: Ability to write crafted serialized data to user_career.extra_data, directly or through a separate vulnerability
  • Trigger point: Processing of the affected database value by PHP's native unserialize() calls
  • Why exploitation is possible: Deserialization permits arbitrary PHP object instantiation, and autoloaded Symfony, Doctrine, or Monolog classes may provide usable property-oriented programming chains

Why this happens

The vulnerable code treats a database value as trusted serialized PHP data and passes it to unserialize() without restricting class creation. PHP object deserialization can invoke class behavior and magic methods during or after reconstruction, allowing attacker-controlled object graphs to reach dangerous application behavior. This is CWE-502: Deserialization of Untrusted Data, even though the serialized value is retrieved from a database rather than supplied directly in a request.

The vulnerable code treats a database value as trusted serialized PHP data and passes it to unserialize() without restricting class creation. PHP object deserialization can invoke class behavior and magic methods during or after reconstruction, allowing attacker-controlled object graphs to reach dangerous application behavior. This is CWE-502: Deserialization of Untrusted Data, even though the serialized value is retrieved from a database rather than supplied directly in a request.

Potential impact

  • An attacker may execute arbitrary operating-system commands as the web server user.
  • Server confidentiality could be compromised through unauthorized data access.
  • Application records, uploaded content, or configuration could be altered or destroyed.
  • The LMS may become unavailable through service disruption or destructive actions.
  • Compromised application privileges could enable further movement within the hosting environment.
  • An attacker may execute arbitrary operating-system commands as the web server user.
  • Server confidentiality could be compromised through unauthorized data access.
  • Application records, uploaded content, or configuration could be altered or destroyed.
  • The LMS may become unavailable through service disruption or destructive actions.
  • Compromised application privileges could enable further movement within the hosting environment.

General mitigation guidance

Mitigation centers on removing unsafe object deserialization and reducing trust in stored serialized values.

Common defensive patterns include:

  • Replacing native PHP object deserialization with structured formats such as JSON where object reconstruction is unnecessary.
  • If deserialization is unavoidable, using strict class allowlists and disabling class instantiation by default.
  • Validating extra_data against a narrowly defined schema before processing it.
  • Treating database contents as untrusted when they can be influenced through imports, administrative tools, or other application flaws.
  • Restricting administrative and import capabilities according to least privilege.
  • Running the web process with minimal operating-system permissions and isolating it from sensitive resources.
  • Applying defense-in-depth controls around autoloaded gadget-producing dependencies and monitoring unexpected process execution.

Mitigation centers on removing unsafe object deserialization and reducing trust in stored serialized values.

Common defensive patterns include:

  • Replacing native PHP object deserialization with structured formats such as JSON where object reconstruction is unnecessary.
  • If deserialization is unavoidable, using strict class allowlists and disabling class instantiation by default.
  • Validating extra_data against a narrowly defined schema before processing it.
  • Treating database contents as untrusted when they can be influenced through imports, administrative tools, or other application flaws.
  • Restricting administrative and import capabilities according to least privilege.
  • Running the web process with minimal operating-system permissions and isolating it from sensitive resources.
  • Applying defense-in-depth controls around autoloaded gadget-producing dependencies and monitoring unexpected process execution.

How teams detect issues like this

Detection can combine source review, dependency analysis, and runtime monitoring:

  • Use static analysis rules to identify calls to unserialize() that process database, request, import, or other mutable data without class restrictions.
  • Review code paths that deserialize values before schema validation or authorization checks.
  • Search for serialized-object fields whose writers include administrative panels, imports, SQL-backed workflows, or lower-privilege roles.
  • Enforce code-review and CI policies that require approved serializers and explicit class allowlists.
  • Monitor web-server processes for unexpected child-process creation, shell execution, or access to sensitive files.
  • Automated security review tools may help identify unsafe deserialization calls and reachable gadget-chain dependencies.

Detection can combine source review, dependency analysis, and runtime monitoring:

  • Use static analysis rules to identify calls to unserialize() that process database, request, import, or other mutable data without class restrictions.
  • Review code paths that deserialize values before schema validation or authorization checks.
  • Search for serialized-object fields whose writers include administrative panels, imports, SQL-backed workflows, or lower-privilege roles.
  • Enforce code-review and CI policies that require approved serializers and explicit class allowlists.
  • Monitor web-server processes for unexpected child-process creation, shell execution, or access to sensitive files.
  • Automated security review tools may help identify unsafe deserialization calls and reachable gadget-chain dependencies.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/commit/4da33d8fd317fe5d58041f3202dddc62282ef2fb
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v2.0.1
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-pr59-4rm7-ghwx

Frequently asked

questions

The deserialization sink is reachable through Chamilo processing paths, but exploitation generally also requires a way to write attacker-controlled serialized data into the affected database field.

Not necessarily. Administrative or import access may provide a write path, but exploitation could also be enabled by a separate SQL injection or another lower-privilege application weakness.

Eliminate native PHP object deserialization for attacker-influenced data. Prefer a structured data format, or enforce a strict class allowlist and validation when deserialization cannot be removed.

Treat database values as untrusted, restrict who can write serialized fields, apply least privilege to application processes, and enforce static-analysis and code-review policies for deserialization APIs.

The deserialization sink is reachable through Chamilo processing paths, but exploitation generally also requires a way to write attacker-controlled serialized data into the affected database field.

Not necessarily. Administrative or import access may provide a write path, but exploitation could also be enabled by a separate SQL injection or another lower-privilege application weakness.

Eliminate native PHP object deserialization for attacker-influenced data. Prefer a structured data format, or enforce a strict class allowlist and validation when deserialization cannot be removed.

Treat database values as untrusted, restrict who can write serialized fields, apply least privilege to application processes, and enforce static-analysis and code-review policies for deserialization APIs.

Find out what's already
exploitable in your codebase.