Skip to content

Vulnerability in SnakeYaml dependency of Ruler #183

Open

Description

Current behavior

Our security scanning tooling report that SnakeYAML v1.30 dependecy used by Ruler v1.4.0 contains this vulnerability

SnakeYaml Constructor Deserialization Remote Code Execution

Summary

SnakeYaml's Constructor class, which inherits from SafeConstructor, allows
any type be deserialized given the following line:

new Yaml(new Constructor(TestDataClass.class)).load(yamlContent);

Types do not have to match the types of properties in the
target class. A ConstructorException is thrown, but only after a malicious
payload is deserialized.

Severity

High, lack of type checks during deserialization allows remote code execution.

Upgrading SnakeYAML to version 2.0 or later will fix this issue.

I'm not sure if this issue is relevant for a Gradle Plugin or not. On the first glance it looks like it can be. RCE is a type of vulnerability that can be relevant for a Gradle plugin.

Anyway, it can be that upgrading this dependency is easier than figuring out if this issue is relevant or not. And it is easier for us to close our security issue if the vulnerability is gone rather than explaining internally why it's irrelevant. So, we'll appreciate if this is fixed by upgrading the dependency.

Expected behavior

No vulnerability.

Steps to reproduce

No response

Versions

1.4.0

Anything else?

No response

Activity

  1. added
    bug
    on Mar 7, 2025
  2. kibotu commented on Aug 12, 2026

    @kibotu

    If helpful, this is resolved in my fork: https://github.com/kibotu/ruler

    It is a complete overhaul rather than a small patch. For a quick overview of the changes: main...kibotu:ruler:main

    If there is interest, I would be happy to discuss upstreaming any of the changes. I’d also be curious to hear if there are concerns or edge cases I may have missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions