CVE-2021-44078: Sandbox Escape in Unicorn Engine

unicorn Updated 02 Oct 2025

Summary

26/12/2021
Yes i
Unrated
Not published

CVE-2021-44078: An issue was discovered in split_region in uc.c in Unicorn Engine before 2.0.0-rc5. Affects unicorn across 2 version ranges.

< 2.0.0rc1 < c733bbada356b0373fa8aa72c044574bb855fd24

Fixed in c733bbada356b0373fa8aa72c044574bb855fd24. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Unicorn Engine is an open-source library that provides a lightweight, multi-platform CPU emulator framework. It is commonly used for binary analysis, reverse engineering, and vulnerability research. The engine allows users to emulate the execution of code in various architectures, including x86, ARM, MIPS, and more. Unfortunately, a vulnerability has been discovered in Unicorn Engine that allows local attackers to escape the sandbox and execute arbitrary code on the host machine.

Vulnerability Detail

The specific vulnerability exists within the virtual memory manager of Unicorn Engine. The issue arises from a faulty comparison of the Guest Virtual Address (GVA) and Guest Physical Address (GPA) during the execution of the split_region function in uc.c. This flaw can be exploited by an attacker who already has the ability to execute crafted code within the target sandbox. By leveraging this vulnerability, an attacker can escape the sandbox and gain unauthorized access to the host machine. The ramifications of this vulnerability include potential data breaches, privilege escalation, and the execution of malicious code.

How To Fix

Minimum fixed version

c733bbada356b0373fa8aa72c044574bb855fd24

This is the first release that contains the fix.

pip install --upgrade "unicorn==c733bbada356b0373fa8aa72c044574bb855fd24"

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

Workaround

As a workaround, users can consider implementing additional security measures to limit the impact of this vulnerability. This may include restricting access to the affected sandbox, implementing strict code execution policies, and monitoring for any suspicious activities or attempts to escape the sandbox. However, applying the official fix by updating to the latest version is strongly recommended to fully address the vulnerability.

Conclusion

The vulnerability in Unicorn Engine allows local attackers to escape the sandbox and execute arbitrary code on the host machine. To mitigate this risk, it is crucial to update the Unicorn Engine library and all related dependencies to the latest patched version. Implementing additional security measures and monitoring for suspicious activities can provide temporary mitigation, but the official fix should be applied as soon as possible. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for unicorn →

Share this vulnerability

FAQ

Unicorn Engine is an open-source CPU emulator framework used for binary analysis, reverse engineering, and vulnerability research.

The vulnerability allows local attackers to escape the sandbox and execute arbitrary code on the host machine, potentially leading to data breaches, privilege escalation, and the execution of malicious code.

To fix this vulnerability, update the Unicorn Engine library to version 2.0.0-rc5 or later. Ensure that all dependencies and applications using Unicorn Engine are also updated.

While implementing additional security measures can help limit the impact of the vulnerability, it is strongly recommended to apply the official fix by updating to the latest version.

Related vulnerabilities

Recent vulnerabilities recorded for unicorn.

How To Fix

Minimum fixed version

c733bbada356b0373fa8aa72c044574bb855fd24

This is the first release that contains the fix.

pip install --upgrade "unicorn==c733bbada356b0373fa8aa72c044574bb855fd24"

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