Insecure Deserialization

Published on 24 Jun 2018
1 min read
owasp

Insecure Deserialization is a vulnerability which occurs when some untrusted data is used to abuse the logic of the application and inflicting a denial of service (DoS) or even remote code execution.

Example

php forum uses object serialization to save a “super” cookie containing the user’s user ID, role, password hash, and other states:-

        a:5:{i:0;i:189;i:1;s:7:"harry";i:2;s:4:"user"; i:3;s:32:"c9f8b3bea87acc669522f8f3c88bc780";}
    

An attacker changes the serialized object and give themselves admin privileges:-

        a:5:{i:0;i:1;i:1;s:7:"john";i:2;s:5:"admin";
        i:3;s:32:"c9f8b3bea87acc669522f8f3c88bc780";}

    

Impact

Insecure Deserialization flaws can lead to remote code execution attacks. which is one of the most serious attack.

Mitigation / Precaution

  • Implementing integrity checks like digital signatures on any serialized objects will prevent hostile object creation and data tampering.
  • running code and Isolating environments that deserializes in low privilege when possible.
Manindar Mohan
Written by
Cyber Security Lead Engineer

Manieendar is a dedicated Security Engineer with a wealth of experience in the cybersecurity landscape. He plays a pivotal role at Beagle Security, where he employs his extensive knowledge to safeguard systems against cyber threats. Manieendar's passion for cybersecurity extends beyond his professional role; he actively contributes to the online security community through insightful articles and speaking engagements.

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo