Toutes les vulnérabilités
CRITICALAppSecexploited in the wild

APPSEC-DESERIAL

Web app · Insecure Deserialization

Résumé

Insecure deserialization occurs when an application reconstructs objects from attacker-controlled serialized data without validating it, so the deserializer instantiates arbitrary types and invokes their lifecycle/magic methods (Java readObject, .NET ISerializable/SetObjectData, PHP __wakeup); attackers chain these side effects through pre-existing library classes, or gadget chains, to reach a sink that executes code without the application ever calling a dangerous function directly. It maps to OWASP A08:2021 Software and Data Integrity Failures (CWE-502). The 2015 disclosure by Chris Frohoff and Gabriel Lawrence ('Marshalling Pickles') and the ysoserial tool weaponized Apache Commons Collections gadget chains via InvokerTransformer, exposing thousands of Java apps. A landmark exploited case is Telerik UI for ASP.NET AJAX CVE-2019-18935 (CVSS 9.8), a .NET deserialization flaw in the RadAsyncUpload component that CISA reported (AA23-074A) was used by threat actors to breach a US federal civilian agency's IIS server between November 2022 and January 2023.

Comment l’éviter dans votre code

  • Do not deserialize untrusted data with native serializers (Java ObjectInputStream, .NET BinaryFormatter, PHP unserialize).
  • Use data-only formats (JSON) with explicit schemas and reject polymorphic type resolution.
  • Enforce a strict allowlist of permitted classes during any required deserialization.
  • Sign or HMAC serialized payloads and verify integrity before deserializing.
  • Keep libraries patched, remove known gadget classes from the classpath, and run with least privilege.

Références

Vulnérabilités liées

Tout AppSec →