Skip to the content.

Security Policy

🏠 Overview  •  📦 Installation  •  📖 Usage  •  🏗️ Architecture  •  🏢 Enterprise  •  🔒 Locking  •  🌐 Networking  •  🐚 Shells  •  🎯 Threat Matrix  •  ❓ FAQ  •  ⚖️ SDKMAN! Comparison  •  📜 Changelog  •  🛡️ Security  •  🤝 Contributing  •  💬 Support


Supported Versions

Currently, only versions 1.0.2 and newer of the Java Version Manager for Windows are supported with active security patches and vulnerability mitigations. Versions 1.0.0 and 1.0.1 are unsupported and deprecated due to missing defensive guardrails, elevation boundary mitigations, and parser protections introduced in 1.0.2.

Version Supported Status
>= 1.0.2 ✅ Supported (Active Security Maintenance)
1.0.1 ❌ Unsupported (End of Life — Immediate Upgrade to 1.0.2+ Required)
1.0.0 ❌ Unsupported (End of Life — Immediate Upgrade to 1.0.2+ Required)
< 1.0.0 ❌ Unsupported (End of Life)

Threat Model & Security Posture

DiamTek Java Version Manager (JVM) is engineered for enterprise developer workstations and managed corporate environments. The security perimeter is hardened against common Windows attack vectors, Local Privilege Escalation (LPE), and software supply chain tampering.

1. Zero-File In-Memory UAC Elevation & Environment Saturation Immunity (LPE / TOCTOU Defense)

2. Download Verification & Payload Integrity

3. Repository File Fail-Closed Validation (.java-version & .sdkmanrc Hardening)

4. Buffer Overflow & Environment Truncation Defense

5. Cryptographic Supply Chain Provenance (SLSA / Sigstore)

6. Dual Update Channel Integrity, Unified Uninstaller Verification & Downgrade Prevention

7. Windows Alternative Data Streams (ADS) and Poison Character Neutralization

8. Non-Destructive Reparse Point & Junction Lifecycle

9. Registry ValueKind Preservation & Non-Blocking Broadcasts

10. Enterprise PowerShell & Constrained Language Mode

11. Atomic Failure-Path Rollback, Deterministic Resource Hygiene & Zero Silent Exceptions

12. Automated 327-Test Security Suite & 41-CWE Coverage Matrix (tests/Test-JvmSecurity.ps1)

Every commit and release is continuously verified by tests/Test-JvmSecurity.ps1, which executes 327 automated adversarial test cases across 16 defensive suites with a 100% pass rate (327 / 327 PASS) and outputs a numerically sorted 41-CWE Coverage Summary:

CWE ID Vulnerability Class Tests Verified Status
CWE-20 Improper Input & Config Validation (.java-version BOM/CRLF, .sdkmanrc fail-closed validation, JVM_CALLER_PID, LATEST_VER, CUSTOM_VER, REL_ADOPTIUM, bump-version.ps1, winget schema, Semeru/Corretto build parsing, interactive uninstaller menu, --json parsing contract, DO_PIN_WRITE validation, locked candidate/version validation, lock CLI aliases, PowerShell dynamic tab completion coverage, exact semantic build + support, jvm cache CLI arguments, jvm search candidate tool routing and shorthand queries, jvm compare specification baseline and multi-LTS milestone JEP chaining, PowerShell profile hook status inspection, single-value queries, why resolution graph, explain 7-layer architecture, welcome tutorial, toolchain conflict detectors, subcommand dedicated help card routing, universal structured JSON API contract envelope) 70 / 70 PASS
CWE-22 Path Traversal & ZipSlip (.., /, \, sibling-prefix collisions, rooted archive entries, :FetchAndExtract GetFullPath, jvm cache import entry containment validation, jvm install --locked ancestor traversal, locked tool candidate traversal) 25 / 25 PASS
CWE-41 Win32 Canonicalization Bypass (current., current , multiple trailing dots/spaces) 6 / 6 PASS
CWE-59 Symlink & Junction Safety (Remove-DirectorySafely, Remove-ReparsePointOrFail, Test-HasReparsePointInLineage, CURRENT_SYMLINK, :WriteConfigFile, :EmitSessionEnv, jvm link/unlink, :UninstallCandidate, elevated :UninstallJDK, build-msi.ps1 hooks, :CleanCache, jvm pin, $PROFILE reparse guards, .jvm.lock reparse point / junction rejection, jvm cache import reparse point rejection) 36 / 36 PASS
CWE-66 DOS Reserved Device (CON, NUL.jdk, archive entry device names) & NTFS ADS (:stream, \\.\) Abuse 5 / 5 PASS
CWE-73 Environment, Registry ValueKind, Test-TrustedJvmInstallDirectory (InstallLocation / -SourceDir early abort), System Root Protection, Content-Addressed Storage layout, and ownership.json variable tracking 14 / 14 PASS
CWE-74 XML Attribute & Template Injection (Escape-XmlAttr / [System.Security.SecurityElement]::Escape in build-msi.ps1) 2 / 2 PASS
CWE-78 OS Command & Shell Metacharacter Injection (:ValidateStrictIdentifier, :RejectExclamationArg, :EcoPerformCheck, :ShowDynamicMenu, :ShowCurrentStatus, :DoctorDiagnostics, pipe-free :SwitchCandidate, Invoke-DeferredDirectoryCleanup, UPDATE_CHECKER_PS1 pipe character escaping, Oracle JDK 27 batch parenthesis integrity) 28 / 28 PASS
CWE-88 Argument & Flag Injection (--evil-flag, --vendor poisoning, jvm exec, jvm open comma delimiter guard, DL_STRIP_ROOT leading hyphen guard, URL/PS metacharacter filter in :ValidateStrictIdentifier, jvm run contextual wrapper arguments) 10 / 10 PASS
CWE-94 Batch set /a Arithmetic Expression & Variable Assignment Evaluation Defense (:ShowDynamicMenu JAVA_VERSION numeric guard) 1 / 1 PASS
CWE-155 Wildcard Expansion Injection (*, ?) 2 / 2 PASS
CWE-184 Incomplete List-Based Input Sanitization (Clean working tree enforcement in bump-version.ps1 & manifest validation) 4 / 4 PASS
CWE-209 Error Message Stack-Trace, Contextual Actionable Errors, Sensitive User Path Suppression, Universal CLI Logging (--quiet, --verbose), Diagnostic Report Secret Redaction (jvm report) & Centisecond Execution Timing Breakdown (--timings) Stderr Isolation 10 / 10 PASS
CWE-250 Privilege Boundary Isolation (Base64 UTF-16LE -EncodedCommand AST immunity & persist-credentials: false in GitHub Actions) 2 / 2 PASS
CWE-252 Unchecked Return Value, Semantic Exit Codes (0-10) & Process Exit Code Propagation 20 / 20 PASS
CWE-276 Strict Directory DACL & Reparse Isolation (%JVM_SECURE_TEMP%, Initialize-SecureDirectory fail-closed enforcement, First-Run .initialized permission bounds) 3 / 3 PASS
CWE-295 TLS 1.2 / 1.3 Cryptographic Protocol Enforcement (:ExecuteSharedDownloader, :SelfUpdate, :CheckUpdateStatus) 3 / 3 PASS
CWE-319 Strict https:// URI Scheme & Redirect Enforcement (:ExecuteSharedDownloader, chocolateyInstall.ps1, .jvm.lock non-HTTPS rejection, enterprise download mirror URL validation) 5 / 5 PASS
CWE-330 CSPRNG Temp Filename Entropy (Zero predictable !RANDOM! paths; [System.IO.Path]::GetRandomFileName()) 1 / 1 PASS
CWE-345 Version & Monotonic JVM_BUILD Downgrade Attack Defense (Alongside MSI Authenticode signing hook verification & 3-state lockfile signature verification) 7 / 7 PASS
CWE-354 Checksum Manifest Format Validation & SHA-256 Gate Enforcement (.jvm.lock SHA-256 validation, authentic distribution archive freeze resolution & tamper defense) 18 / 18 PASS
CWE-362 Race Condition & Concurrent State (state.lock mutex wait loop, atomic dead-PID takeover via staged owner.pid replacement with --no-lock unsafe override, :WriteConfigFile atomic replacement via .stage.!_CFG_RND!.tmp, .jvm.lock atomic staged write .stage.<guid>.tmp, jvm transaction journaling & rollback) 12 / 12 PASS
CWE-367 Atomic Staged Profile & Config File Writes (Move-Item -LiteralPath, Windows Terminal file-lock retry/backup, UTF-8 No BOM) 3 / 3 PASS
CWE-377 Insecure Temporary File & Protected DACL Verification (Get-Acl / icacls fallback cross-version compatibility) 2 / 2 PASS
CWE-390 Error Condition Action, AST Zero-Silent-Catch Audit & Logging 4 / 4 PASS
CWE-400 Hang & Parser Resilience (SendMessageTimeout, state lock wait timeout, PATH boundaries, NO_COLOR, JSONC, Resumable Range .part download staging, Adaptive Terminal Width, Real-time speed/ETA throttling, Cache telemetry & dedupe loops) 14 / 14 PASS
CWE-409 Zip Bomb & Decompression Bounds (40,000 entry ceiling & 1.75 GB cumulative decompressed byte cap) 1 / 1 PASS
CWE-426 Untrusted Search Path & CWD Trojan Binary Planting Defense (%SYS32%, $PATH:java, chocolateyUninstall.ps1, test-msi.ps1, license header pinning bootstrapping) 9 / 9 PASS
CWE-427 Uncontrolled PATH Search-Order Hijack Immunity & Canonical %LOCALAPPDATA%\DiamTek\JVM\bin Registration 4 / 4 PASS
CWE-428 Quoted System32 UninstallString / QuietUninstallString & Pinned Shortcut TargetPath 1 / 1 PASS
CWE-459 Failure-Path Handle Disposal (finally), Temporary Artifact & Stream Cleanup, Transaction Rollback Stale Lock Cleanup 14 / 14 PASS
CWE-460 Exception Cleanup, Atomic State Rollback (PREV_JUNCTION_TARGET, .old, .jvm_bak_, $batBackup, jvm transaction rollback & aliases, cache import fail-safe cleanup, transactional snapshot restore dual rollback) & Universal --dry-run Simulation 25 / 25 PASS
CWE-494 Supply Chain, Package Manifest, Fail-Closed Nightly Git Blob SHA-1, Invoke-TrustedGitHubDownload, jvm install --locked Checksum Verification, jvm cache import Content-Addressed Storage SHA-256 verification, explicit --skip-checksum warning flag, CI gating, Multi-Phase Installation pipeline & Rollback verification 28 / 28 PASS
CWE-532 Sensitive Registry Backup (%LOCALAPPDATA%\DiamTek\JVM\backups) DACL & Reparse Isolation, Redacted Issue & Support Bundles (jvm doctor --report, jvm support) 2 / 2 PASS
CWE-601 Open Redirect Host Verification (ResponseUri validation on payload, Get-TrustedChecksumText, :ResolveLatestEcosystemCandidate, & :CheckUpdateStatus) 4 / 4 PASS
CWE-611 XML External Entity (XXE) & DTD Prohibition (DtdProcessing::Prohibit & XmlResolver = $null) 4 / 4 PASS
CWE-674 Uncontrolled Recursion & Cyclic Loops (Remove-DirectorySafely iterative non-recursive queue pattern immune to self-referential junctions) 1 / 1 PASS
CWE-754 Exceptional Condition Check, Local NTFS Volume Advisories, Colon Guards (::::::::::::::::::::), Fail-Closed Parameter Validation, Smart Retry Exponential Backoff (429/5xx handling), Universal JSON Contract Schema Envelope Validation 20 / 20 PASS
CWE-755 Exceptional Condition Handling, Early ConstrainedLanguageMode Guard, Ctrl+C Offset Skip Absorption & Sanitized Exception Redaction 8 / 8 PASS
CWE-798 Hardcoded Credentials Defense (Rejection of hardcoded default secrets in HMAC-SHA256 lockfile signing; strict fail-closed enforcement of caller-managed secrets via $env:JVM_LOCK_SECRET, --secret, or --key-file) 1 / 1 PASS
CWE-918 SSRF & Vendor Domain Allowlist Enforcement (Test-TrustedJvmUri regex bounds, chocolateyInstall.ps1 $allowedHosts, live CLI --offline network barrier, jvm install --locked host allowlist, and CAS offline install verification) 7 / 7 PASS

13. Security & Error Management Audit Scorecard (10.0 / 10.0)

Audit Area Subsystem Scope CWE Classes Covered Pass 4 Verification Status Score
Core Batch Engine & Junctions jvm.bat (CURRENT_SYMLINK, :SwitchCandidate, :UpdateSystemPath, :InstallGlobalCommand, :BackupRegistry) CWE-59, CWE-252, CWE-459, CWE-460, CWE-754 Verified atomic rollback on switch failures with emergency alert, local NTFS volume UNC advisories, verified exit-code propagation, and quarantined registry backups. 10.0 / 10.0
Downloader, APIs & Elevation jvm.bat (:ExecuteSharedDownloader, :VerifyDownloadedScript, :SelfUpdate, :Run_API_Query, UAC handoffs) CWE-209, CWE-252, CWE-459, CWE-460, CWE-755 Verified deterministic try / finally disposal on HttpWebResponse, StreamReader, SHA1, and process elevation handles (Start-Process -PassThru). 10.0 / 10.0
Installers & Uninstallers install.ps1 & uninstall.ps1 CWE-73, CWE-209, CWE-252, CWE-276, CWE-367, CWE-390, CWE-459, CWE-460, CWE-494, CWE-674, CWE-754, CWE-755 Verified atomic $batBackup rollback, fail-closed Nightly Git-blob SHA-1 verification, fail-closed Initialize-SecureDirectory DACL enforcement, partial download purging, COM apartment release, safe shortcut validation, early ConstrainedLanguageMode fail-closed policy, fail-closed invalid -SourceDir abort, and cyclic junction immunity (Remove-DirectorySafely). 10.0 / 10.0
Packaging & Build Pipelines packages/msi/build-msi.ps1, packages/msi/test-msi.ps1, packages/choco/build-choco.ps1, scripts/bump-version.ps1 CWE-184, CWE-209, CWE-252, CWE-390, CWE-459, CWE-460, CWE-611, CWE-754 Verified zero empty catch {} blocks via AST, emergency msiexec /x rollback, manifest rollback, clean git tree enforcement, and XXE prohibition. 10.0 / 10.0
Concurrency & State Synchronization jvm.bat (:AcquireStateLock, :ReleaseStateLock, :WriteConfigFile, :EmitSessionEnv, %JVM_SECURE_TEMP%) CWE-330, CWE-362, CWE-367, CWE-377, CWE-400 Verified cross-process mutual exclusion (state.lock), atomic staged configuration replacement (.stage.!_CFG_RND!.tmp + move /y), CSPRNG random file naming, and per-user ACL lockdown. 10.0 / 10.0
Adversarial Test Suite tests/Test-JvmSecurity.ps1 All 41 MITRE CWE Classes 327/327 tests passing (0 failures) with runtime error injection, cyclic directory junction fuzzing, live process tree kill recovery, CAS cache verification, download throughput telemetry, subcommand dedicated help card routing, centisecond execution timing breakdown, universal structured JSON API contract envelope, environment profiles, snapshots, portable bundles, air-gapped distro kits, and automatic environment state preservation. 10.0 / 10.0
Overall Posture Complete Repository Ecosystem 41 MITRE CWE Classes Zero unhandled failure paths, zero leaked handles, zero silent catches, zero cyclic recursion hazards. 10.0 / 10.0

Vulnerability Scope Matrix

Category In-Scope Out-of-Scope
Remote Code Execution Unauthenticated RCE via auto-downloader, candidate engine, or archive unpacking Code execution requiring an attacker to already control local administrator credentials
Path Traversal (Zip Slip) Archive extraction writing files outside %LOCALAPPDATA%\DiamTek\JVM User explicitly running jvm link pointing to a compromised local directory
Privilege Escalation Bypassing standard user boundaries to gain Administrator rights without UAC consent Attacker already having elevated Administrator or SYSTEM privileges on the machine
Command Injection Injecting commands via .java-version, .sdkmanrc, or CLI argument parsing Manually editing the jvm.bat file on local disk
Alternative Data Streams & Canonicalization NTFS ADS stream injection (:stream) or trailing dot/space Win32 canonicalization bypasses in identifiers Modifying NTFS metadata with raw disk write privileges
Reparse Point & Junction Target Deletion Recursive deletion traversing directory junctions to wipe host JDK installations Manual deletion of target JDK folders by external tools or users
Environment & Registry Integrity Accidental type demotion of REG_EXPAND_SZ to REG_SZ, or PATH overflow truncation Malicious software directly altering registry keys via background elevated service
Broadcast Deadlock & Hanging Stalled process execution during WM_SETTINGCHANGE environment broadcasts Operating system kernel deadlock or failure of user32.dll subsystem
Transport Security Silent acceptance of tampered/corrupted downloads when checksum is expected Network denial-of-service or outages on vendor APIs (Adoptium, Oracle, GitHub, BellSoft)

Reporting a Vulnerability

If you discover a potential security vulnerability in DiamTek Java Version Manager, please report it through coordinated disclosure. Do not create public GitHub issues or forum discussions for security vulnerabilities.

Reporting Channels

  1. GitHub Security Advisories (Preferred): Navigate to the repository’s Private Vulnerability Reporting page to open a confidential report.
  2. Direct Email: Send an encrypted or plaintext report to the project maintainer:
    • Contact: Alexéy Shishkin
    • Email: salexey09@gmail.com
  3. Discord (Direct Message): Reach out directly to @thehawk01 on Discord for initial coordination.

What to Include in Your Report

To help us triage and reproduce the issue rapidly, please include:


Response & Remediation SLA

We take all security reports with utmost urgency:

Phase Target SLA Description
Initial Acknowledgment < 48 hours We confirm receipt of your report and begin preliminary assessment.
Triage & Reproduction < 7 days We validate the PoC in an isolated Windows sandbox and determine severity.
Patch & Release < 30 days We develop, verify via the automated test suite, and deploy a patched release.
Coordinated Disclosure Negotiated We publish security advisories and credit reporters (unless anonymity is requested).

← Back to Documentation Overview