Skip to content

In-depth lesson · technique

Unsafe deserialisation

What every disclosed Unsafe deserialisation report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.

reports cited in this lesson
170

Learning Server-side injection, step 8

Overview

What it is and why programs pay for it.

Unsafe deserialisation is the mistake of turning untrusted data back into live objects without restricting which classes can be created. The evidence covers many languages and formats: PHP unserialise, Ruby Marshal and YAML load, Java object streams and SnakeYAML, Python YAML load, and others. When a program rebuilds objects from input an attacker controls, the attacker can often choose the class and its properties, and that choice can steer the program into running code or reaching sensitive functions. This is why it matters: it frequently ends in remote code execution, but the reports also show lesser outcomes such as account takeover, token leaks, file deletion and SSRF.

The reports show it turning up in web frameworks and their plugins, in configuration and import flows, in signed cookies and session handling, in message queues and RPC endpoints, in enterprise products and in thick client applications. Examples include WordPress plugins, Laravel and Symfony packages, Rails cookie and Active Storage handling, JBoss and WebLogic endpoints, ColdFusion, SharePoint and Exchange, and Android apps. The common thread is a feature that accepts structured data from a user or a peer and rebuilds objects from it.

The database behind this lesson is small relative to the number of reports: 176 reports, 18 with a summary and 21 paid. So the evidence is a sample, not a complete picture, and the tips below stay close to what those reports actually describe.

How it works

The mechanics, as the reports show them.

The basic mechanism is that a serialisation format can carry more than plain values. It can name a class and set its fields. A safe parser only produces strings, numbers, lists and maps. An unsafe one will instantiate whatever class the data names. The reports show this in several forms: a YAML parser passing tagged values to unserialise, a YAML loader that instantiates arbitrary Python objects, and a JSON parser with default typing that lets a property name any class.

Once the attacker can choose the class, the next step is a gadget chain: a sequence of classes whose normal methods, run during or after deserialisation, end up calling something dangerous. The reports describe chains built from WordPress core classes, from Laravel and from a Symfony package, and a universal Ruby chain tested against YAML load sinks. The chain does not need a single obviously dangerous function; it needs a path from object creation to a useful side effect.

Several reports show the entry point being something that looks harmless. A signed cookie is trusted because it is signed, but if the signing secret leaks, the attacker can sign a serialised object and the app will deserialise it. Rails message verifiers and encryptors default to the Marshal serializer, so signed values become live Ruby objects. A committed session secret made exactly this possible in one report.

Other reports show indirect routes. A JSON key can become a method on a Ruby object, letting the attacker override methods the Redis client relies on. A JAAS login module can be pointed at an attacker LDAP server and the response is deserialised without validation. A template engine can expose serializer objects to a JavaScript engine, letting attacker JSON influence type handling. In each case the deserialisation is a step inside a larger flow rather than an obvious endpoint.

What makes it possible is usually a default or a convenience. A library defaults to an unsafe loader, a framework defaults to Marshal, a parser enables default typing, or a developer uses the unsafe variant of a load function. The reports repeatedly contrast the safe option with the one that was used: safe constructor versus plain instantiation, safe load versus unsafe load, an allowed-classes list versus none.

Year by year

11 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2026: 238
Reports per year
200129
20091
20111
20137
20141
20158
201614
201729
201823
201942
2020137
202160
202259
202368
202488
2025184
2026238
  1. 2026

    238 reports · median $3,000

    New this year2

    • Testing the HPLC precision analysis tool for insecure deserialisation first appears in the disclosed reports.
    • Crafting a JSON response that the template engine passes to the JavaScript engine to build a JSON serializer with unsafe type handling is a new technique in the disclosed reports.

    Turned up less1

    • Testing Sitecore for deserialisation of an object leading to code execution, seen in 2025, is not repeated in the 2026 disclosed reports.

    Reports from 20262

  2. 2025

    184 reports

    New this year1

    • Testing Sitecore for deserialisation of an object leading to code execution as in CVE-27218 is newly noted in the disclosed reports.

    Turned up less3

    • Identifying and exploiting unsafe deserialisation sinks in Ruby code, seen in 2024, is rarer in the 2025 disclosed reports.
    • Testing ColdFusion for pre-authentication JNDI injection and deserialisation code execution, common in 2024, is less prominent in the 2025 disclosed reports.
    and 1 more
  3. 2024

    88 reports · median $4,860

    New this year3

    • Looking for Bundler responses that are Marshal loaded and crafting a malicious response first appears in the disclosed reports.
    • Supplying a repository containing a crafted .rdoc_options file and seeing whether running rdoc deserialises objects from it is a new technique in the disclosed reports.
    • Testing R's deserialisation handling as in CVE-2024-27322 is newly noted in the disclosed reports.

    Kept working6

    • Identifying and exploiting unsafe deserialisation sinks in Ruby code worked in the disclosed reports.
    • Testing ColdFusion for pre-authentication JNDI injection and deserialisation code execution was effective in the disclosed reports.
    and 4 more

    Turned up less3

    • From 2023 many reports are dedicated to finding and publishing gadget chains in common frameworks such as WordPress, Laravel and Symfony bundles, but this is rarer in the 2024 disclosed reports.
    • Abusing Inductive Automation Ignition's custom deserialisation to compromise two hosts at once, common in 2023, is not repeated in the 2024 disclosed reports.
    and 1 more
Every point, year by year

Where it is found

1

The features and places the reports found it in, most-reported first.

  1. Perl 5.8 deserialisation handling is a place where this issue can appear.

    Seen in 1 report

Root causes

11

The mistakes in the code or configuration behind the reports.

  1. SnakeYAML was instantiated without a SafeConstructor, allowing arbitrary Java object construction from untrusted YAML.

    Seen in 2 reports
  2. The YAML parser passes tagged values to unserialize, so the documented safety of the yaml_parse family does not hold.

    Seen in 1 report
  3. The session secret was committed to a public repository and the app used CookieStore with unsafe deserialisation of cookie data.

    Seen in 1 report
  4. Checksum parsing used YAML.load instead of a safe loader, and the resulting objects allowed a chain to Marshal.load on attacker data.

    Seen in 1 report
  5. MessageVerifier and MessageEncryptor default to the Marshal serializer, so signed values deserialise into live Ruby objects.

    Seen in 1 report
View all 11

Things to try

The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.

ticked in this lesson

Enterprise CMS platforms

of 3 ticked
More in Enterprise CMS platforms

Java deserialisation endpoints

of 3 ticked
More in Java deserialisation endpoints

PHP object injection and gadget chains

of 3 ticked
More in PHP object injection and gadget chains

YAML loaders and class instantiation

of 3 ticked
More in YAML loaders and class instantiation
View more things to try

Payouts

27 paid

Public bounties in US dollars, from the data. 27 of 1,147 reports show an amount.

a quarter paid up to
$750
median
$1,500
three quarters paid up to
$4,999
highest
$90k

One in ten paid reports was paid $20k or more.

SeverityReportsPaidMedianHighest
Critical 183 4 $4,000 $34k
High 418 4 $4,760 $20k
Medium 53 3 $1,000 $1,000
Low 4 1 $250 $250
Informational 1 0 None paid None
Unrated 488 15 $1,000 $90k

Highest-paid reports5

Tips for beginners

13

Advice for a first hunt, drawn from the reports.

  1. For PHP, build or find a gadget chain in the framework in use. The reports show chains in WordPress core, Laravel and a Symfony package, and phar deserialisation triggered through file operations such as logging settings or an importer. If you can trigger a file operation on a phar, you may not need a direct unserialise call.

    Seen in 5 reports
  2. Start with the language and framework defaults. If the target is Ruby on Rails, look at signed cookies, message verifiers and cache fetches that use the raw option. If it is Java, look at YAML parsing and JSON default typing. If it is PHP, look at unserialise calls and the yaml_parse family. Knowing the default unsafe path saves time.

    Seen in 4 reports
  3. Search for the unsafe variant of a load function in code you can read, and check whether the input is user controlled. The reports name several: YAML load instead of a safe loader, PyYAML unsafe load instead of safe load, SnakeYAML without a safe constructor, and unserialise without an allowed-classes list.

    Seen in 4 reports
  4. Look at import and configuration flows. A CSV importer, a config file, a repository containing a crafted options file, or a checksum file parsed during an upload are all places where structured data is rebuilt into objects. These are often overlooked because they are not obvious API endpoints.

    Seen in 4 reports
  5. For Java targets, probe known servlet and RPC endpoints rather than guessing. The reports mention JBoss JMXInvokerServlet and EJBInvokerServlet, WebSphere SOAP endpoints, JMeter RMI and Dubbo consumers. These are established surfaces where deserialisation is expected.

    Seen in 4 reports
View all 13

Guides and techniques

The best explainers, cheat sheets and technique posts on Unsafe deserialisation, from around the web.

Keep learning

Where this lesson fits, and what to read next.

How this is made: our model read every listed Unsafe deserialisation report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 26 Nov 2026 from 176 reports. All Unsafe deserialisation reports.