CVE-2013-4221: Arbitrary Java Code Execution in Restlet via Crafted XML

org.restlet.jse:org.restlet Updated 02 Oct 2025

Summary

17/05/2022
Yes i
High
Not published

CVE-2013-4221: Restlet is vulnerable to Arbitrary Java Code Execution via crafted XML. Affects org.restlet.jse:org.restlet versions < 2.1.4. Fixed in 2.1.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Restlet is a Java-based framework for building web applications and APIs. It provides a simple and flexible way to handle HTTP requests and responses. The ObjectRepresentation class in Restlet before version 2.1.4 is vulnerable to arbitrary Java code execution when deserializing objects from untrusted sources using the Java XMLDecoder. This vulnerability allows remote attackers to execute arbitrary Java code by crafting malicious XML payloads.

Vulnerability Detail

The default configuration of the ObjectRepresentation class in Restlet before version 2.1.4 allows for the deserialization of objects from untrusted sources using the Java XMLDecoder. This can be exploited by remote attackers who can craft malicious XML payloads to execute arbitrary Java code. By exploiting this vulnerability, an attacker can gain unauthorized access, manipulate data, or perform other malicious actions on the affected system. The vulnerability has a severity rating of HIGH.

How To Fix

Minimum fixed version

2.1.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to Restlet version 2.1.4 is not immediately feasible, a possible workaround is to disable XML deserialization in the affected code. This can be achieved by modifying the code to use a different serialization mechanism or by implementing custom input validation and sanitization before deserialization. Here is an example of how to disable XML deserialization in Restlet:

// Disable XML deserialization
ObjectRepresentation.setXmlDecoderEnabled(false);

Please note that this workaround may have implications on the functionality of the affected code and should be thoroughly tested before deployment.

Conclusion

The vulnerability in Restlet allows for arbitrary Java code execution via crafted XML payloads. To mitigate this vulnerability, it is recommended to upgrade to Restlet version 2.1.4 or later. If immediate upgrade is not feasible, disabling XML deserialization in the affected code can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.restlet.jse:org.restlet →

Share this vulnerability

FAQ

Restlet is a Java-based framework for building web applications and APIs. It provides a simple and flexible way to handle HTTP requests and responses.

The vulnerability in Restlet is an arbitrary Java code execution vulnerability. It allows remote attackers to execute arbitrary Java code by crafting malicious XML payloads and exploiting the deserialization process in the ObjectRepresentation class.

The impact of this vulnerability can be severe. An attacker can gain unauthorized access to the affected system, manipulate data, or perform other malicious actions by executing arbitrary Java code.

To fix this vulnerability, it is recommended to upgrade to Restlet version 2.1.4 or later. This version includes a fix for the deserialization vulnerability. Alternatively, you can disable XML deserialization in the affected code as a temporary workaround.

Yes, a possible workaround is to disable XML deserialization in the affected code. This can be achieved by modifying the code to use a different serialization mechanism or by implementing custom input validation and sanitization before deserialization.

Related vulnerabilities

Recent vulnerabilities recorded for org.restlet.jse:org.restlet.

How To Fix

Minimum fixed version

2.1.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback