Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2025-59489 — Automated scanner that detects Unity runtime injection vulnerability CVE-2025-59489 in Android APKs by extracting Unity version and checking against patched versions, with batch processing and CI/CD integration. | Kitploit
Tools/GitHubGitHub/taptap/cve-2025-59489
Android SecurityStatic AnalysisVulnerability ScannersDevSecOpsMobile Security
GitHubtaptap/cve-2025-59489

cve-2025-59489

Automated scanner that detects Unity runtime injection vulnerability CVE-2025-59489 in Android APKs by extracting Unity version and checking against patched versions, with batch processing and CI/CD integration.

View Repository
15210 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Unity CVE-2025-59489 Vulnerability Detection Tool

An automated detection tool for Unity Runtime injection vulnerabilities, specifically designed for Android game platforms.

Vulnerability Overview

  • CVE ID: CVE-2025-59489
  • CVSS Score: 8.4 (High)
  • Affected Scope: Android applications built with Unity 2017.1 and later versions
  • Official Advisory: https://unity.com/security/sept-2025-01

Detailed Impact Analysis

Maximum Impact (Worst Case)

In one sentence: An attacker can gain complete control over affected Unity games/applications, obtaining all permissions granted to the application.

Android Platform Attack Scenarios

  1. The user has a malicious app A installed on their phone
  2. The user also has an affected Unity game B installed on their phone
  3. Malicious app A can:
    • Impersonate game B to execute arbitrary code
    • Steal all data accessible to game B (save files, account information, photos, contacts, etc.)
    • Use all permissions granted to game B (camera, microphone, location, network, etc.)

Key Point: On Android, a malicious app can hijack permissions already granted to a Unity application

Windows Platform Attack Scenarios

  1. The user clicks a malicious web link
  2. If an affected Unity game is installed on the computer
  3. The attacker can:
    • Remotely trigger the game to load malicious code
    • Execute arbitrary operations with the game's permissions
    • Steal files and data accessible to the game

Key Point: On Windows, if the game registers a custom URI handler, clicking a specially crafted link can trigger the vulnerability

Specific Impact Examples

Important Limitations

Good news: Attackers cannot exceed the application's own permission boundaries

  • ❌ Cannot obtain root privileges
  • ❌ Cannot access other applications' data (Android sandbox protection)
  • ❌ Can only act under the identity of the compromised application

Bad news: Many games require extensive permissions (camera, microphone, storage, location, etc.), and attackers can fully exploit these permissions

Impact on Game Platforms

As an Android game platform operator, the worst consequences:

  1. User privacy leakage → Platform reputation damage
  2. Large-scale account theft → User churn
  3. Legal liability → Failure to fulfill security review obligations
  4. Financial losses → User claims, regulatory penalties

[Source: Unity official security advisory, GMO Flatt Security technical analysis]

Quick Start

Environment Requirements

root@kitploit:~
# Only requires Python 3.7+ standard library, no additional dependencies
python3 --version  # Verify Python version

Get Started in 5 Minutes

root@kitploit:~
# Step 1: Run the tests
python test_demo.py

# Step 2: Check a single APK
python unity_vulnerability_checker.py your_game.apk

# Step 3: Batch check
python unity_vulnerability_checker.py --batch /path/to/apks

# Step 4: View usage examples
python usage_examples.py

Simplest Usage

root@kitploit:~
from unity_vulnerability_checker import check_unity_vulnerability

# Check a single APK file
result = check_unity_vulnerability("your_game.apk")

# Method 1: Use convenience properties
if result.is_vulnerable:
    print(f"⚠️  Application affected! ({result.version})")
    print(f"Recommendation: {result.recommendation}")
elif result.is_safe:
    print(f"✅ Application is safe")
    print(f"Reason: {result.message}")
else:
    print(f"❓ Manual review required")
    print(f"Reason: {result.message}")

# Method 2: Use the status field
if result.status == "positive":
    print(f"Affected: {result.version}")

Batch Check All APKs in a Directory

root@kitploit:~
from unity_vulnerability_checker import batch_check

# Batch scan a directory
results = batch_check("/path/to/apk/folder")

# Filter affected applications
vulnerable_apps = [
    (name, result) 
    for name, result in results.items() 
    if result.is_vulnerable
]
print(f"Found {len(vulnerable_apps)} affected applications")
for name, result in vulnerable_apps:
    print(f"  - {name}: {result.version}")

Integration into Existing Systems

root@kitploit:~
from unity_vulnerability_checker import UnityVulnerabilityChecker

class MyPlatform:
    """Your game platform system"""

    def __init__(self):
        self.checker = UnityVulnerabilityChecker()

    def check_new_upload(self, apk_path: str) -> bool:
        """Check newly uploaded APK, return whether it can be published"""
        result = self.checker.check_apk(apk_path)

        if result.is_vulnerable:
            # Affected - reject publication
            self.notify_developer(
                f"Your application is affected by the Unity vulnerability\n"
                f"Version: {result.version}\n"
                f"Recommendation: {result.recommendation}"
            )
            return False
        elif result.is_safe:
            # Safe - approve publication
            return True
        else:
            # Cannot determine - manual review
            self.queue_manual_review(apk_path, result.message)
            return False

    def notify_developer(self, message: str):
        """Notify developer (implement your notification logic)"""
        pass

    def queue_manual_review(self, apk_path: str):
        """Add to manual review queue (implement your logic)"""
        pass

Understanding Detection Results

The tool returns three types of results:

  • positive - Confirmed affected (update required)
  • negative - Safe (not Unity or already patched)
  • inconclusive - Cannot determine (manual review required)

Output Examples (single-line concise format):

root@kitploit:~
# Affected application
⚠️  This application is affected by CVE-2025-59489 (Unity 2019.2.6f1)

# Safe application (3 cases)
✅ This application is safe - Not a Unity application
✅ This application is safe - Already patched with Unity patcher tool
✅ This application is safe - Patched version (2019.4.41f1)

# Cannot determine
❓ Cannot determine - Unity application but version extraction failed, possibly packed or obfuscated, manual review recommended
⚠️  File too large to process (1500.0MB, limit 1024MB) - modify MAX_APK_SIZE_MB on line 15 of the code to a larger value

Project File Structure

root@kitploit:~
.
├── unity_vulnerability_checker.py  # Core module
│   ├─ UnityVulnerabilityChecker class - Vulnerability detection core engine
│   ├─ check_unity_vulnerability() - Simplified detection function
│   ├─ batch_check() - Batch detection functionality
│   └─ Complete version parsing and determination logic
│
├── usage_examples.py               # Usage examples
│   ├─ Basic usage examples
│   ├─ Batch detection examples
│   ├─ Platform integration examples
│   ├─ Automated response examples
│   └─ Flask API integration examples
│
├── test_demo.py                    # Test demo
│   ├─ Version number parsing tests
│   ├─ Version extraction tests
│   ├─ Patch determination tests
│   ├─ APK scanning scenario simulations
│   └─ Performance benchmark tests
│
├── test_version_detection.py       # Unit tests (33 test cases)
│
├── README.md                       # Complete documentation (includes quick start guide)
│
└── CLAUDE.md                       # Development guidelines

Core Features

APK Detection

  • Automatically identify Unity applications
  • Extract Unity version numbers
  • Determine if affected by CVE-2025-59489
  • Return three detection results: positive (affected), negative (safe), inconclusive (manual review required)

Batch Processing

  • Supports directory batch scanning
  • Generates statistical reports
  • Suitable for large-scale application review

Easy Integration

  • Clean API interface
  • Command-line tool
  • Embeddable into existing systems

Usage Guide

Command-Line Usage

root@kitploit:~
# Single file detection
python unity_vulnerability_checker.py game.apk

# Verbose logging mode
python unity_vulnerability_checker.py game.apk -v

# Batch check a directory
python unity_vulnerability_checker.py --batch /path/to/apk/folder

# Batch check (verbose mode)
python unity_vulnerability_checker.py --batch /path/to/apk/folder -v

Batch Scan and Generate Report

root@kitploit:~
from unity_vulnerability_checker import batch_check

results = batch_check("/path/to/apk/directory", verbose=True)

# Filter affected applications
vulnerable = {name: result for name, result in results.items()
              if result.is_vulnerable}

print(f"Found {len(vulnerable)} affected applications")

Integration into Review Systems

root@kitploit:~
from unity_vulnerability_checker import UnityVulnerabilityChecker

class AppReviewSystem:
    def __init__(self):
        self.checker = UnityVulnerabilityChecker(verbose=False)

    def review_upload(self, apk_path: str) -> str:
        result = self.checker.check_apk(apk_path)

        if result.is_vulnerable:
            return "REJECT"  # Reject publication
        elif result.is_safe:
            return "APPROVE"  # Approve
        else:
            return "MANUAL_REVIEW"  # Manual review

reviewer = AppReviewSystem()
decision = reviewer.review_upload("new_game.apk")

Flask API Integration

root@kitploit:~
from flask import Flask, request, jsonify
from unity_vulnerability_checker import check_unity_vulnerability

app = Flask(__name__)

@app.route('/api/scan', methods=['POST'])
def scan_apk():
    file = request.files['file']
    temp_path = f"/tmp/{file.filename}"
    file.save(temp_path)

    result = check_unity_vulnerability(temp_path)

    # Use the to_dict() method to convert directly to JSON
    response = result.to_dict()
    response["filename"] = file.filename
    response["vulnerable"] = result.is_vulnerable
    
    return jsonify(response)

Detection Principles

Detection Logic Flowchart

root@kitploit:~
          ┌─────────────────┐
          │   Read APK file   │
          └────────┬─────────┘
                   │
                   ▼
          ┌─────────────────┐
          │ Is it a Unity app? │──NO──> negative
          └────────┬─────────┘
                   │ YES
                   ▼
          ┌─────────────────────┐
          │ Patcher patch detected? │──YES──> negative
          └────────┬─────────────┘
                   │ NO
                   ▼
          ┌─────────────────┐
          │ Extract Unity version  │──Failed──> inconclusive
          └────────┬─────────┘
                   │ Success
                   ▼
          ┌─────────────────┐
          │ Version < 2017.1 ?  │──YES──> negative
          └────────┬─────────┘
                   │ NO
                   ▼
          ┌─────────────────┐
          │  Version patched?     │──YES──> negative
          └────────┬─────────┘
                   │ NO
                   ▼
               positive

1. Unity Application Identification

Checks whether the APK contains the following characteristics:

  • lib/*/libunity.so - Unity runtime library
  • assets/bin/Data/* - Unity resource files

2. Version Extraction

Extracts the Unity version number from the following locations:

  • libunity.so - Version string in the binary library
  • globalgamemanagers - Unity data file
  • data.unity3d - Packaged resource files

Supported version number formats:

  • Standard format: 2019.4.40f1, 2022.3.15f1
  • New format: 6000.0.23f1, 6000.2.6f2
  • No suffix: 2019.4.40, 6000.0.23

3. Vulnerability Determination

Based on rules from the Unity official security advisory:

  1. Before Unity 2017.1 → Safe
  2. Patched versions → Safe
  3. Unity 2017.1–2018.4 → Cannot determine (no official patch from Unity)
  4. Unity 2019.1+ unpatched → Affected (patch available)

Patched Version Reference Table

Practical Application Scenarios

Scenario 1: App Store Review

Automatically scan before app publication, reject affected applications

root@kitploit:~
from unity_vulnerability_checker import check_unity_vulnerability

def pre_publish_check(apk_path):
    result = check_unity_vulnerability(apk_path)
    if result.is_vulnerable:
        return {
            "approved": False, 
            "reason": f"CVE-2025-59489 vulnerability detected ({result.version})",
            "recommendation": result.recommendation
        }
    return {"approved": True, "message": result.message}

Scenario 2: Existing Application Scan

Batch scan the existing application library to identify applications requiring updates

root@kitploit:~
python unity_vulnerability_checker.py --batch /data/published_apps > scan_report.txt

Scenario 3: Automated Monitoring

Daily scheduled scanning of newly uploaded applications with automatic developer notification

root@kitploit:~
import schedule
from unity_vulnerability_checker import batch_check

def daily_scan():
    results = batch_check("/data/new_uploads")
    vulnerable = [(name, result) for name, result in results.items() if result.is_vulnerable]
    if vulnerable:
        # Send notification with detailed information
        for name, result in vulnerable:
            send_notification(name, result.version, result.message)

schedule.every().day.at("02:00").do(daily_scan)

Scenario 4: Security Report Generation

Generate platform security reports with vulnerability distribution statistics

root@kitploit:~
from unity_vulnerability_checker import batch_check
import json

results = batch_check("/data/all_apps")
report = {
    "total": len(results),
    "vulnerable": sum(1 for r in results.values() if r.is_vulnerable),
    "safe": sum(1 for r in results.values() if r.is_safe),
    "unclear": sum(1 for r in results.values() if r.is_uncertain),
    # Detailed list
    "vulnerable_apps": [
        {"name": name, "version": r.version, "message": r.message}
        for name, r in results.items() if r.is_vulnerable
    ]
}

with open("security_report.json", "w") as f:
    json.dump(report, f, indent=2)

Scenario 5: CI/CD Integration

Integrate into continuous integration pipelines for automated security checks

root@kitploit:~
#!/bin/bash
# Use in CI pipeline

python unity_vulnerability_checker.py build/output.apk
result=$(python unity_vulnerability_checker.py build/output.apk | grep "Detection result")

if echo "$result" | grep -q "positive"; then
    echo "Security check failed: CVE-2025-59489 detected"
    exit 1
fi

echo "Security check passed"

Performance Metrics

  • Single file detection: 0.5 - 2 seconds (depends on APK size)
  • Version parsing: < 0.01 milliseconds (in-memory operation)
  • Batch scanning: Supports parallel processing (configurable process count)
  • Memory usage: < 100 MB (per single detection)

Important Notes

False Positives/False Negatives

Cases that may be incorrectly classified as safe:

  • APK has been obfuscated or packed
  • Version information has been modified or removed
  • Non-standard build process used

Cases that may be incorrectly classified as affected:

  • Abnormal version number format but actually already patched
  • Wrong version string extracted

Usage Recommendations

  1. Manual review: For inconclusive results, manual review is recommended
  2. Combined detection: Use alongside other security scanning tools
  3. Continuous updates: Monitor Unity's official updated patched version list
  4. Not a substitute for manual security audits: This tool serves only as an automated initial screening method

Frequently Asked Questions

Why does it return "inconclusive"?

Possible reasons:

  • APK has been packed or obfuscated
  • Version information has been removed
  • Corrupted file
  • Unity 2017.1-2018.4 versions (no official patch)

Recommendation: Perform manual review for such applications

Why do Unity 2017/2018 versions return "inconclusive"?

Unity has not provided security patches for versions 2017.1-2018.4. These versions are indeed vulnerable, but because:

  • Unity has stopped supporting these versions
  • No official patched version is available for upgrade
  • Developers cannot resolve the issue through a simple update

Therefore "inconclusive" is returned instead of "positive", with the following recommendations:

  1. Communicate with developers to upgrade to Unity 2019.1+ and rebuild
  2. Use Unity's official mitigation tool as a temporary solution
  3. Assess the risk and decide whether to remove the app or grant a grace period

How accurate is the detection?

Based on rules from the Unity official advisory, accuracy for standard-built APKs is > 95%. Obfuscated or packed APKs may require additional processing.

How is the performance?

Single APK detection typically completes within 0.5-2 seconds, with support for parallel batch processing to improve efficiency. Detailed performance metrics can be found in the "Performance Metrics" section of this document.

Can it detect iOS applications?

The current version focuses on Android APKs. iOS .ipa file detection requires additional adaptation.

How do I update the patched version list?

Modify the PATCHED_VERSIONS dictionary in unity_vulnerability_checker.py, and monitor Unity's official advisory for the latest information.

Security Recommendations

Platform Operators

  1. Act Immediately

    • Remove affected applications or restrict downloads
    • Notify developers to update as soon as possible
  2. Continuous Monitoring

    • Establish daily automated scanning mechanisms
    • Monitor newly uploaded applications
  3. User Notification

    • Push update prompts to users with the app installed
    • Provide vulnerability explanations and remediation guidance

Developers

  1. Upgrade Unity Version

    • Update to the latest patched version
    • Recompile and publish the application
  2. Temporary Solutions (when upgrade is not possible)

    • Use the Unity Application Patcher
    • Replace the affected runtime library
  3. Verify the Fix

    • Use this tool to verify the new version
    • Confirm it is no longer reported as positive

Related Links

  • Unity Official Advisory: https://unity.com/security/sept-2025-01
  • Remediation Tool Download: https://unity.com/security/sept-2025-01/remediation
  • CVE Details: https://nvd.nist.gov/vuln/detail/CVE-2025-59489
  • Technical Analysis (GMO Flatt Security): https://flatt.tech/research/posts/arbitrary-code-execution-in-unity-runtime/

Technical Support

Encountering issues?

  1. Review the detailed documentation in this file
  2. Run test_demo.py to verify the tool works correctly
  3. Check usage_examples.py for similar scenarios
  4. Contact Unity officially for the latest information

Development Guide

Environment Setup

The project includes complete code quality checking tools:

root@kitploit:~
# Install dependencies
pip install ruff pre-commit

# Install pre-commit hooks
pre-commit install

# Manually run all checks
pre-commit run --all-files

Code Quality Standards

The following checks run automatically before every commit:

  1. Ruff Linter - Python code static analysis

    • Checks code style (PEP 8)
    • Detects potential errors
    • Auto-fixes common issues
  2. Ruff Formatter - Python code formatting

    • Standardizes code formatting
    • 88-character line length limit
  3. General File Checks

    • Removes trailing whitespace
    • Ensures newline at end of file
    • YAML/TOML format validation
    • Detects large files (>1MB)
    • Detects merge conflict markers
  4. Markdown Format Checks

    • Auto-fixes formatting issues
    • Checks code block language identifiers

Configuration Files

  • ruff.toml - Ruff configuration
  • .pre-commit-config.yaml - Pre-commit hooks configuration

Pre-Commit Checks

All code must pass ruff checks before committing. If checks fail, the commit will be blocked.

root@kitploit:~
# If pre-commit fails, some issues will be auto-fixed
# After fixing, re-run git add and commit
git add .
git commit -m "your message"

Running Checks Manually

root@kitploit:~
# Check Python files only
ruff check *.py

# Auto-fix issues
ruff check --fix *.py

# Format code
ruff format *.py

Changelog

v1.2.0 (2025-10-13)

  • Added Unity Patcher patch detection functionality
  • Optimized output information

v1.1.0 (2025-10-11)

  • Fixed version determination logic error (major >= 2019 or major >= 6000)
  • Added support for beta/alpha version parsing and comparison
  • Stricter Unity application identification rules
  • Added file size validation (500MB limit)
  • Implemented parallel batch processing
  • Switched to standard logging module
  • Switched to argparse for command-line argument parsing
  • Extracted magic numbers as constants
  • Configured pre-commit hooks and ruff linter
  • All code passes ruff quality checks

v1.0.0 (2025-10-11)

  • Initial release
  • Supports Unity 2017.1 - 6000.x version detection
  • Supports batch scanning functionality
  • Command-line interface
  • Based on Unity CVE-2025-59489 official advisory

License

This tool is intended for security auditing and compliance checking purposes only.

Download Tool
If the game has this permissionThe attacker can
📸 CameraSecretly record you
🎤 MicrophoneEavesdrop on you
📍 LocationTrack you
📱 ContactsSteal your address book
💾 StorageRead/delete your files
💰 PaymentsFraudulently use in-game payments
🔐 AccountSteal game accounts
Unity VersionMinimum Patched VersionStatus
6000.36000.3.0b4✅ Patch available
6000.26000.2.6f2✅ Patch available
6000.0 LTS6000.0.58f2✅ Patch available
2022.32022.3.62f2✅ Patch available
2021.32021.3.45f2✅ Patch available
2020.x2020.1.18f1+✅ Patch available
2019.x2019.1.15f1+✅ Patch available
2017-2018N/A⚠️ No official patch, upgrade recommended