OPNsense
CVE-2025-13698
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to adjacent OPNsense web GUI as admin
-
DeliverySubmit backup restore with traversal filename
-
ExploitBypass missing path validation in diag_backup.php
-
ExecutionWrite arbitrary file as root
-
ImpactEscalate to persistence or code execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated, high-privilege (administrator-level) session on the OPNsense web GUI AND network-adjacent access to the management interface (AV:A), per the CVSS vector and description stating 'Authentication is required.' The specific trigger is the configuration backup/restore handler in diag_backup.php, where the user-supplied backup filename is not validated for path-traversal sequences before being used in file operations, allowing files to be created as root outside the intended /conf/backup (and RRD /var/db/rrd) directories. Limiting factors that reduce real-world risk: the attacker must already hold valid admin credentials or a hijacked admin session, must be on an adjacent network segment rather than the open internet, and no user interaction by a victim is needed (UI:N) but privileged access is the gating barrier. |
| Impact | Signals are consistent and point to a moderate, not urgent, priority. The CVSS 3.0 base score is 4.5 (Medium) with vector AV:A/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N: exploitation is constrained to a network-adjacent position and - critically - requires PR:H, meaning an already-authenticated high-privilege (administrative) user. EPSS is low at 0.61% (48th percentile), the CVE is NOT in CISA KEV, and no public POC is referenced, so exploitation status is 'no public exploit identified at time of analysis.' Mapped to an SSVC-style view: exploitation = none observed, automatable = no (requires valid admin authentication and adjacency), technical impact = total (files are created in the context of root, which can escalate to full compromise despite the base score only crediting I:H). The key tension is that the technical impact (arbitrary root-owned file creation, a realistic stepping stone to RCE/persistence) is far more severe than the 4.5 score suggests, but the preconditions (adjacent + admin auth) heavily gate real-world risk. This is a legitimate patch-and-move-on item for defense-in-depth against a rogue or compromised admin, not a drop-everything emergency. |
| Exploit ScenarioDerived | An authenticated administrator (or an attacker who has hijacked/obtained an admin session on the same management network segment) submits a crafted configuration backup restore via diag_backup.php where the filename contains directory-traversal sequences. Because the user-supplied path is not validated before the file operation, a file is written outside the intended backup directory in the root context, which can be used to drop or overwrite system files and pivot toward code execution. No public exploit code is identified at time of analysis, though the vendor fix commit is public and could aid reverse-engineering. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
A path-traversal flaw in Deciso OPNsense's diag_backup.php configuration backup/restore handler lets an administrator-level user supply a crafted backup filename that is used in file operations without validation, allowing arbitrary file creation with root privileges outside the intended /conf/backup and /var/db/rrd directories. The attack surface is limited: the CVSS vector (AV:A/PR:H/UI:N) and the vendor description both require a valid high-privilege web GUI session plus network-adjacent access to the management interface, so a remote unauthenticated attacker cannot reach it directly. Impact is integrity-only (no confidentiality or availability loss), EPSS is low at 0.61% (48th percentile), there is no CISA KEV listing, and no public exploit code has been identified at time of analysis; an upstream fix commit exists in the opnsense/core repository and ZDI tracks the issue as ZDI-25-1022 / ZDI-CAN-28133.
RemediationAI
Apply the upstream fix commit cb15c935137d05c86a1e6cf12af877e9c32a23af (https://github.com/opnsense/core/commit/cb15c935137d05c86a1e6cf12af877e9c32a23af) or upgrade to the OPNsense release that incorporates it - the patch adds basename() sanitization of backup filenames and replaces raw exec() calls with the shell_safe() helper, so no released version number can be cited from the available data and administrators should confirm against the vendor's changelog and the ZDI advisory (https://www.zerodayinitiative.com/advisories/ZDI-25-1022/) before assuming a given point release is clean. If immediate upgrade is not possible, restrict the web GUI and SSH management interfaces to a trusted management VLAN or explicit allow-list of admin hosts so that AV:A preconditions cannot be met from adjacent segments, and note this also blocks legitimate off-VLAN administration; remove or disable the RRD restore/import capability for non-essential accounts and enforce least privilege by not granting GUI administrator rights to routine operators, accepting that this does not remove the flaw for true admins; and terminate and rotate any administrator sessions that may have been hijacked, since a stolen admin session fully satisfies the PR:H precondition. Monitoring for unexpected files appearing outside /conf/backup and /var/db/rrd and for unusual rrdtool dump/restore invocations provides detection coverage but is not a substitute for patching.
Affected ProductsAI
Deciso OPNsense firewall/router distributions containing the pre-fix code in src/www/diag_backup.php and src/etc/inc/rrd.inc, specifically builds that still construct RRD restore paths as "/var/db/rrd/{$rrd['filename']}" and shell out to rrdtool via raw exec() rather than shell_safe(); no CPE strings or an exact affected/fixed release number were supplied in the source data, and the vendor advisory reference for this issue is ZDI-25-1022 at https://www.zerodayinitiative.com/advisories/ZDI-25-1022/ with the fix commit at https://github.com/opnsense/core/commit/cb15c935137d05c86a1e6cf12af877e9c32a23af. OPNsense installations deployed purely as a firewall with the GUI restricted to a dedicated management VLAN are affected in the same code path but far less exposed operationally.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OPNsense is a FreeBSD-based firewall/router distribution whose web GUI is implemented in PHP; diag_backup.php handles backup download, restore and configuration operations executed as root. The vulnerability is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / Path Traversal): a user-supplied backup filename from the restore path is concatenated directly into filesystem paths such as "/var/db/rrd/{$rrd['filename']}" and passed to shell commands invoking /usr/local/bin/rrdtool (dump and restore) without normalizing or rejecting '..' sequences. Because the PHP-FPM/GUI backend runs with elevated privilege, traversal out of the RRD directory yields file creation as root. The upstream commit cb15c935137d05c86a1e6cf12af877e9c32a23af addresses the root cause by wrapping filenames in basename() before path construction (e.g. "/var/db/rrd/" . basename($rrd['filename'])) and by replacing raw exec() calls with the shell_safe() quoting/argv helper for rrdtool dump/restore and the /usr/bin/du disk-usage call, closing both the traversal and the command-injection exposure that came from interpolating unquoted variables into shell strings. The CVSS vector AV:A/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N places the flaw at adjacent-network reachability with high privileges required and integrity-only impact.
Know when Opnsense gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:A/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
Requires an authenticated admin session over the adjacent management network (PR:H, AV:A), with low complexity and no victim interaction; only integrity is affected via root-owned arbitrary file creation (I:H, C:N/A:N).
Primary rating from Vendor (trendmicro).
CVSS VectorVendor: trendmicro
DescriptionCVE.org
Deciso OPNsense diag_backup.php filename Directory Traversal Arbitrary File Creation Vulnerability. This vulnerability allows network-adjacent attackers to create arbitrary files on affected installations of Deciso OPNsense. Authentication is required to exploit this vulnerability.
The specific flaw exists within the handling of backup configuration files. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this vulnerability to create files in the context of root. Was ZDI-CAN-28133.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Insecure permissions in the configuration directory (/conf/) of OPNsense Community Edition before 23.7 and Business Edit
DECISO OPNsense 23.1 does not impose rate limits for authentication, allowing attackers to perform a brute-force attack
A command injection vulnerability in the component /api/cron/settings/setJob/ of OPNsense Community Edition before 23.7
A command injection vulnerability in the component diag_backup.php of OPNsense Community Edition before 23.7 and Busines
/ui/cron/item/open in the Cron component of OPNsense Community Edition before 23.7 and Business Edition before 23.4.2 al
OPNsense Community Edition before 23.7 and Business Edition before 23.4.2 was discovered to contain insecure permissions
Insecure permissions exist for configd.socket in OPNsense Community Edition before 23.7 and Business Edition before 23.4
A directory traversal vulnerability in the Captive Portal templates of OPNsense Community Edition before 23.7 and Busine
A Cross-Site Request Forgery (CSRF) in the System Halt API (/system/halt) of OPNsense Community Edition before 23.7 and
OPNsense 19.1 contains a stored cross-site scripting vulnerability that allows authenticated attackers to inject malicio
OPNsense 19.1 contains a stored cross-site scripting vulnerability in the system_advanced_sysctl.php endpoint that allow
OPNsense 19.1 contains a reflected cross-site scripting vulnerability that allows unauthenticated attackers to inject ma
NVD
CVE.org
EPSS
GitHub
Exploit-DB