Open-source project
pwntester/ysoserial.net avatar
pwntester/ysoserial.net

ysoserial.net's recommended install path is a CI artifact, and its newest release is from 2023

Deserialization payload generator for a variety of .NET formatters

3,806 stars526 forksC#MIT

At a glance

What is it?
ysoserial.net generates proof-of-concept payloads for unsafe .NET object deserialization. Its own disclaimer limits that to research and defensive work under explicit authorisation, and the page makes the first half of that concrete by saying the vulnerability belongs to the application doing the deserialising rather than to the libraries on its classpath.
Who is it for?
The project fits a defender who needs to know which serializer and library combinations make an application exploitable, and a researcher testing deserialisation on a system they are authorised to test. It does not fit anything else, and that is the maintainers' position rather than an inference: the disclaimer limits the tool to academic research and defensive techniques, and to attacks only where authorisation is explicit.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 69 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • pwntester/ysoserial.net3,806 ★ · +15
Star history
Repository2026-09-242026-11-15
pwntester/ysoserial.net3.8k3.8k

15 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The recommended install is a CI artifact, and the newest tag is from October 2023

The installation section says that to obtain the latest version it is recommended to download it from the Actions page, and separately that previous releases can be installed from the releases page.

So the page's advice is to take a continuous integration build rather than a release. The three most recent releases are v1.36 from 2023-10-17, v1.35 from 2022-08-16 and v1.34 from 2020-10-08, which means the release line has a two-year gap in it and nothing tagged for about three years.

The last push to master is dated 2026-09-07, so the branch is being worked on. The build badge at the top of the page points at an Azure pipeline with a branch name of v2 in its definition identifier, which is a third state: a branch that is neither master nor any of the released 1.x lines.

For someone who needs to know which code they are running, the tag list and the recommended install point at two different artefacts.

The mechanism in one sentence, and the authorisation boundary in another

The description paragraph is precise about what the driver does. It takes a user-specified command, wraps it in the user-specified gadget chain, and serialises the resulting objects to stdout. When an application that has the required types on its classpath unsafely deserialises that data, the chain is invoked and the command runs on the application host.

Two conditions, then. The application must deserialise unsafely, and the library the chain relies on must be present. The page then draws the line that matters for defence:

It should be noted that the vulnerability lies in the application performing unsafe deserialization and NOT in having gadgets on the classpath.

That is the sentence to keep. A library on a classpath is not a finding; a classpath library combined with an unsafe deserialisation path is. The disclaimer repeats the same framing in its own terms, limiting the software to academic research and the development of defensive techniques and to attacks only where explicitly authorised, and stating the maintainers are not liable for misuse.

The help output is organised by formatter, which is the part worth reading

The documented way to explore the tool is the full help output, which prints a gadgets section. Each entry inside it carries three fields: the formatters that can carry that chain, a labels field with a value such as Not bridge but derived, and extra options where an entry has them, expressed as numbered choices with a default.

That structure is what makes the output useful to somebody defending a system rather than using it. The tool is effectively an inventory of which serializer plus which library combination is dangerous, presented as a matrix rather than as a list of payloads. The formatters named in the visible help output are BinaryFormatter, LosFormatter, NetDataContractSerializer and SoapFormatter.

The labels field is the part that does not explain itself. A value like Not bridge but derived distinguishes one kind of relationship between a chain and a formatter from another, and the page does not define the taxonomy.

Plugins turn the generator into file access and command execution

The plugin interface takes a plugin name and then the plugin's own options, and the page states that the rest of the tool's options are ignored. That is a deliberate handoff: a plugin is its own small program with its own parameter set.

The example on the page targets a named content management product and names the CVE it corresponds to. Its plugin exposes three modes, reading a file, writing a file and running a command, with options for the command, a URL to fetch from, a file to read or write, and a minification switch.

Those modes are primitives, not payloads. A gadget chain produces bytes; a plugin mode says what those bytes are for. This is where the authorisation question stops being theoretical, because a file read and a command execution against a running application have consequences whatever the payload format is, and nothing in the tool records who asked or against what. Handle plugin use as the operation it is.

Output shape is per formatter, and one formatter needs the XML edited by hand

The same chain does not produce the same bytes for every serialiser, and the page says so. XmlSerializer and DataContractSerializer generate a wrapper XML format that includes the expected type in a type attribute on the root node, the arrangement used by one of the products it names.

Then the caveat: you may need to modify the generated XML depending on how XmlSerializer obtains the expected type in your case.

That is a real limitation of the tool's output rather than of its documentation. A wrapper whose type attribute has to be adjusted means the generated bytes are not always a drop-in for the target's expected format, and the person adjusting them needs to understand the target's deserialiser.

The rest of the input handling is smaller: the page notes that complex commands can be tedious to escape and offers standard input as an alternative to shell quoting.

The Windows build path disables the execution policy and pipes a downloaded script into iex

Two build routes are given, Windows and Nix, and they use different toolchains. The Windows route installs Visual Studio 2022 Community, the native desktop workload, the community MSBuild tasks, the NuGet command line and git, all through Chocolatey.

The first line of that route is worth naming precisely rather than quoting. It sets the PowerShell execution policy to bypass for the process scope and then downloads a script from the Chocolatey community site and pipes it into iex. That is remote script execution with the local policy disabled in the same command, and it is the conventional Chocolatey bootstrap, but it is also the least scrutinised line in the document.

Two small defects sit in the same block. One package line repeats the installer name, reading as a nested choco install. And the final command is cut off mid-word, at nuget restore ysoseri, so the Windows instructions do not finish on their own.

The Nix route builds Release and then runs the Debug path

The second route clones the repository, enters a development shell and builds the solution:

bash
git clone https://github.com/pwntester/ysoserial.net
cd ysoserial.net

nix develop --impure
nuget restore ysoserial.sln
dotnet build ysoserial.sln --configuration=Release

The build is configured for Release. The line the page gives immediately after it, to print the tool's help, points at the Debug output directory:

code
mono ysoserial/bin/Debug/ysoserial.exe -h

So the documented path to the binary assumes a Debug build that the documented build did not produce. On a clean checkout that path does not exist until someone builds Debug as well.

The layout explains the rest. The solution and the ysoserial/ project sit at the root, ExploitClass/ holds the chain definitions, TestConsoleApp/ is a host for trying them, flake.nix carries the Nix shell, and Directory.Build.props holds properties shared across the projects. The root also has a logo.png and a LICENSE.txt.

Editorial conclusion

The project fits a defender who needs to know which serializer and library combinations make an application exploitable, and a researcher testing deserialisation on a system they are authorised to test. It does not fit anything else, and that is the maintainers' position rather than an inference: the disclaimer limits the tool to academic research and defensive techniques, and to attacks only where authorisation is explicit. Three things to settle before you build it. Where your authorisation actually comes from, because nothing in the tool asks and the plugin modes include command execution and file access. Which formatter your target accepts, since the output shape differs per formatter and one of them needs editing by hand. And which build you are taking, because the page points at a continuous integration artifact while the newest tagged release is three years old.

Frequently asked questions

What is ysoserial.net for?

It generates proof-of-concept payloads for unsafe .NET object deserialization, as the repository description puts it, and its own disclaimer limits the software to academic research and defensive techniques, and to attacks only where use is explicitly authorised.

Does having gadget libraries on the classpath make an application vulnerable?

No, and the page says so directly: the vulnerability lies in the application performing unsafe deserialization, not in having gadgets on the classpath. A chain only fires when the application deserialises the data unsafely and the required types are present.

How do I get the latest ysoserial.net build?

The page recommends downloading it from the repository's Actions page and says previous releases can be installed from the releases page. The three most recent releases are v1.36 from 2023-10-17, v1.35 from 2022-08-16 and v1.34 from 2020-10-08.

What does the ysoserial.net help output show?

A gadgets section where each entry lists the formatters that can carry that chain, a labels field, and any extra options the entry takes as numbered choices with a default. The formatters named in the visible help include BinaryFormatter, LosFormatter, NetDataContractSerializer and SoapFormatter.

Can ysoserial.net read or write files on a target?

Through its plugin interface, yes. The plugin described on the page offers read_file, write_file and run_command modes against a named content management product and a specific CVE, which is why the authorisation boundary matters more for plugins than for the gadget chains.

Which licence is ysoserial.net released under?

MIT, with a LICENSE.txt file at the repository root. The disclaimer also states that the software is a personal project not related to any companies, including the employers of the project owner and of the contributors.

Official sources

  1. Issues
  2. License: MIT
  3. pwntester/ysoserial.net on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/pwntester-ysoserial-net.svg)](https://hysenlabs.com/projects/pwntester-ysoserial-net)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/pwntester-ysoserial-net.svg)](https://hysenlabs.com/projects/pwntester-ysoserial-net)

Was this useful?