CVE-2025-14307 Overview
CVE-2025-14307 is an insecure temporary file creation vulnerability in the AutoExtract component of Robocode version 1.9.3.6. The createTempFile method fails to securely create temporary files, exposing the application to race condition exploitation. Attackers with local access can manipulate the temporary file creation process to execute arbitrary code or overwrite critical files on the host system. The flaw is categorized under CWE-377: Insecure Temporary File.
Critical Impact
Local attackers can leverage a race condition in temporary file handling to overwrite files or achieve arbitrary code execution within the context of the Robocode process.
Affected Products
- Robocode 1.9.3.6
- CPE: cpe:2.3:a:robocode:robocode:1.9.3.6:*:*:*:*:*:*:*
- Component: robocode:robocode (AutoExtract module)
Discovery Timeline
- 2025-12-09 - CVE-2025-14307 published to NVD
- 2026-01-05 - Last updated in NVD database
Technical Details for CVE-2025-14307
Vulnerability Analysis
The vulnerability resides in the AutoExtract component of Robocode. The component uses Java's createTempFile method without applying secure file creation semantics. This produces predictable file paths and weak permissions on the resulting temporary files. An attacker on the same system can observe or predict the temporary file path. The attacker can then race the application between the file creation and subsequent use, replacing the file with a symbolic link or attacker-controlled content. Successful exploitation allows attackers to overwrite arbitrary files writable by the Robocode user. In some configurations, exploitation enables arbitrary code execution when Robocode loads or executes the temporary file.
Root Cause
The createTempFile invocation in AutoExtract does not enforce restrictive file permissions or atomic creation guarantees. Temporary files are written to a shared system directory accessible to other local users. The pattern matches CWE-377, where insecure temporary file usage exposes the application to tampering between creation and consumption.
Attack Vector
Exploitation requires local access with low privileges to the system running Robocode. The attacker monitors the temporary directory for files created by the Robocode process. The attacker then exploits the time-of-check to time-of-use (TOCTOU) window by replacing the file or substituting a symlink pointing to a sensitive target. When Robocode writes to or executes the temporary file, the attacker-controlled content is processed or critical files are overwritten. Refer to the Robocode GitHub Pull Request #68 for the upstream remediation details.
Detection Methods for CVE-2025-14307
Indicators of Compromise
- Unexpected symbolic links in the system temporary directory referencing Robocode-created files
- Temporary files created by Robocode with world-readable or world-writable permissions
- Modifications to files outside the Robocode installation directory correlated with Robocode process activity
- Unexpected child processes spawned from the Robocode JVM during extraction operations
Detection Strategies
- Monitor file creation events in /tmp or the platform-equivalent temporary directory for files created by the Robocode process
- Audit file permissions on temporary files produced by Java applications using createTempFile
- Inspect installed Robocode versions against 1.9.3.6 using software inventory tooling
- Correlate process telemetry showing Robocode reading or executing files that were recently modified by other local users
Monitoring Recommendations
- Enable file integrity monitoring on directories where Robocode operates, including user home directories and system temp paths
- Log local user activity in shared temporary directories with auditd or equivalent
- Alert on creation of symbolic links targeting files owned by accounts running Robocode
- Track process lineage from the Robocode JVM to detect unauthorized command execution
How to Mitigate CVE-2025-14307
Immediate Actions Required
- Inventory all hosts running Robocode 1.9.3.6 and restrict execution to single-user systems
- Apply the upstream fix from Robocode Pull Request #68 once released in a tagged version
- Restrict access to systems running Robocode to trusted local users only
- Run Robocode under a dedicated low-privilege account with a private temporary directory
Patch Information
The upstream remediation is tracked in Robocode GitHub Pull Request #68. Administrators should upgrade to a Robocode release that incorporates this pull request and replaces the insecure createTempFile usage with secure temporary file creation primitives.
Workarounds
- Set the java.io.tmpdir system property to a per-user directory with 0700 permissions before launching Robocode
- Disallow shared multi-user access on hosts running Robocode until a patched version is deployed
- Use mandatory access control policies such as SELinux or AppArmor to confine Robocode file access to its installation directory
- Remove Robocode from systems where it is not actively required
# Configuration example: launch Robocode with a private temp directory
mkdir -p "$HOME/.robocode-tmp"
chmod 700 "$HOME/.robocode-tmp"
java -Djava.io.tmpdir="$HOME/.robocode-tmp" -jar robocode.jar
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

