Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Y

ysoserial

> 编程语言
Open source

A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.

9.0K stars0 likes3 views
WebsiteGitHub

About

A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.

ysoserial

A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.

Description

Originally released as part of AppSecCali 2015 Talk "Marshalling Pickles: how deserializing objects will ruin your day" with gadget chains for Apache Commons Collections (3.x and 4.x), Spring Beans/Core (4.x), and Groovy (2.3.x). Later updated to include additional gadget chains for JRE <= 1.7u21 and several other libraries.

ysoserial is a collection of utilities and property-oriented programming "gadget chains" discovered in common java libraries that can, under the right conditions, exploit Java applications performing unsafe deserialization of objects. The main driver program takes a user-specified command and wraps it in the user-specified gadget chain, then serializes these objects to stdout. When an application with the required gadgets on the classpath unsafely deserializes this data, the chain will automatically be invoked and cause the command to be executed on the application host.

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

Disclaimer

This software has been created purely for the purposes of academic research and for the development of effective defensive techniques, and is not intended to be used to attack systems except where explicitly authorized. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.

Usage

…

Examples

…

Installation

Download the latest release jar from GitHub releases.

Building

Requires Java 1.7+ and Maven 3.x+

mvn clean package -DskipTests

Code Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

See Also

  • Java-Deserialization-Cheat-Sheet: info on vulnerabilities, tools, blogs/write-ups, etc.
  • marshalsec: similar project for various Java deserialization formats/libraries
  • ysoserial.net: similar project for .NET deserialization

Issues· 47 open

View all issuesOpen on GitHub
  • #229

    Workaround for compilation failure and other Java versions

    Updated Dec 8, 2025
  • #233

    Spring1 does not work with the current version

    Updated Jul 4, 2025
  • #230

    My own ignorance stuck can someone step-by-step my issues with ysoserial?

    Updated Jan 31, 2025
  • #232

    JSON1 dont work

    Updated Dec 30, 2024
  • #231

    I want to add Scala1.java to the payload, but after adding it, problems keep occurring.

    Updated Nov 20, 2024
  • #183

    Troubleshooting docs

    enhancementUpdated Oct 21, 2024
  • #228

    [ERROR] COMPILATION ERROR

    Updated Oct 20, 2024
  • #10

    Support dependency isolation and/or conflicting versions

    enhancementUpdated Dec 23, 2023
  • #30

    JDK Multiple Version Execution Scaffolding

    enhancementUpdated Dec 23, 2023
  • #155

    Add gadget chains from "New Exploit Technique In Java Deserialization Attack" BH2019 talk

    enhancementhelp wantedUpdated May 16, 2022

> Tags

Javadeserializationexploitgadgetjava

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言