Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
vbox-ovf-href-dest-escape — VirtualBox 7.2.20 - High - Local - File write - OVF href dest escape | Kitploit
Tools/GitHubGitHub/abraxas/vbox-ovf-href-dest-escape
Privilege EscalationVulnerability AnalysisCode AnalysisExploitationSecurity VirtualizationPapers & ResearchLabs & Practice
GitHubabraxas/vbox-ovf-href-dest-escape

vbox-ovf-href-dest-escape

VirtualBox 7.2.20 - High - Local - File write - OVF href dest escape

View Repository
22 days 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

Abraxas Labs - vbox-ovf-href-dest-escape

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  vbox-ovf-href-dest-escape

vbox-ovf-href-dest-escape

Class: File write Reach: Local (host) UI:R

Oracle VM VirtualBox OSS 7.2.20 (f2792cf44) - Oracle

A host user who imports a hostile OVF/OVA writes disk-image bytes outside the new VM folder. ovf:href is the dest filename. RTPathAbsExCxx does not take RTPATHABS_F_STOP_AT_BASE. The unique-path helper inserts _%i before the suffix and does not basename-strip.

IDno CVE yet
ClassFile write (OVF/OVA dest path)
ReachLocal (host) UI:R (victim imports a hostile appliance)
CWECWE-22
CVSSHigh: 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
ProductOracle VM VirtualBox OSS
Affected7.2.20 (f2792cf44f663989818507e36d3db5f978523c5e)
Authnone on VirtualBox. The host user opens File/Import or VBoxManage import.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1 only. Source harness. VirtualBox is not booted.

What an attacker can do

Ship an OVF directory or an OVA. Put ../somewhere/disk.vmdk or an absolute /path/disk.iso in ovf:href. The operator who imports it CREATE_REPLACE-writes those disk-image bytes as the importing UID, including parent directories that did not exist. Suffix required (vmdk / iso / other MediumFormat extensions). This is not a suffix-free drop of authorized_keys.

PrivilegeMethod + sinkWhat it grantsProvenance
IntegrityIAppliance::read copies File/href with no basename strip (ovfreader.cpp). Appliance::interpret() sets dest = di.strHref (ApplianceImplImport.cpp 802-851).Dest filename is attacker-chosen, including ../ and absolute paths.Lab-proven (relative and absolute hrefs)
Integrityi_ensureUniqueImageFilePath (ApplianceImpl.cpp 1126-1160) calls RTPathAbsExCxx(strAbsName, aMachineFolder, aName) with no RTPATHABS_F_STOP_AT_BASE. Collision inserts _%i before the suffix of aName, not a basename.Unique dest still walks off the machine folder. ../oracle/WITNESS.vmdk becomes ../oracle/WITNESS_1.vmdk.Lab-proven (unique-keeps-dotdot=yes)
IntegrityImport i_importOneDiskImage AbsEx again (ApplianceImplImport.cpp 4169-4171). i_importCreateAndWriteDestinationFile (1043-1053) mkdir-parents then RTFILE_O_CREATE_REPLACE.Disk-image bytes land outside the VM folder. Absolute href ignores the machine folder. Control disk.vmdk stays in-folder.Lab-proven (relative-escape=yes absolute-href=yes control-in-folder=yes)
ReconImport wizard / VBoxManage import --dry-run shows the dest.Path is visible. Not a secret leak by itself.Inferred
AvailabilityRelative dest that lands on another VM's disk.Overwrite that file as the importing UID.Inferred (same CREATE_REPLACE write)
ClosedDest with no MediumFormat suffixImport throws has no extension. Not a suffix-free authorized_keys / crontab write.Closed
ClosedNVRAM destForced to {vmname}.nvram under the machine folder.Closed
ClosedVM name ..sanitiseMachineFilename mangles it.Closed
ClosedShared folders / ExtraData / serial RawFileSanitized on the vbox:Machine path.Closed
ClosedHost kernel, guest-to-hostNot this leftover. No VM start required. Same UID as the importer.Closed

OVA is the clean walk: tar member supplies the bytes, href supplies the escaped dest. No 3D, no Guest Additions, no VRDP, not PUEL.

How I found it

I sat on tag v7.2.20 (f2792cf44) after the Sep 2026 CPU and read OVF import. ExtraData, shared folders, NVRAM dest, and serial RawFile are already stripped. The disk dest is not. interpret() copies di.strHref straight into the HardDiskImage VBox value:

Utf8Str strFilename = di.strHref;
/* ... */
i_ensureUniqueImageFilePath(strMachineFolder, devType, strFilename);
pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskImage,
                     hd.strDiskId,
                     di.strHref,
                     strFilename,
                     di.ulSuggestedSizeMB,
                     strExtraConfig);

ApplianceImpl.cpp 1126-1160 completes that name against the machine folder without RTPATHABS_F_STOP_AT_BASE, then mutates aName in place:

int vrc = RTPathAbsExCxx(strAbsName, aMachineFolder, aName);
/* ... */
const char *pszSuffix = RTPathSuffix(aName.c_str());
offDashNum = pszSuffix ? (size_t)(pszSuffix - aName.c_str()) : aName.length();
aName.replace(offDashNum, cchDashNum, szTmp, cchTmp);

Import repeats AbsEx on the still-relative dest (ApplianceImplImport.cpp 4169-4171) and CREATE_REPLACE-writes. IPRT tests document the same join: absolute second argument wins; /VirtualBox/Machines plus ../VirtualBox.xml is /VirtualBox/VirtualBox.xml.

Wrong turns already recorded: treating a suffix-free authorized_keys write as the leftover (import throws); NVRAM dest (forced in-folder); VM name .. (sanitiser); shared folders / ExtraData / serial RawFile (already sanitized). Theatre: host kernel, guest-to-host. The oracle is a witness line outside the machine folder plus a control disk.vmdk that stayed put.

Lab

python3 vbox-ovf-href-dest-escape-Abraxas-Labs.py

or

cd lab
./run.sh

Source harness of interpret dest-join, unique-path, and the import CREATE_REPLACE write. Docker compose, loopback, no VirtualBox binary. Machine folder /work/Machines/ImportedVM. Oracle /work/oracle.

SUCCESS vbox-ovf-href-dest-escape relative-escape=yes unique-keeps-dotdot=yes absolute-href=yes control-in-folder=yes VBOX-OVF-HREF-DEST-ESCAPE-WITNESS

The fix

Basename-strip ovf:href before it becomes a dest, or pass RTPATHABS_F_STOP_AT_BASE (and reject absolute names). Reject RTPATH_PROP_DOTDOT_REFS. Unique-path should mutate the basename, not the relative string.

References

  • github.com/VirtualBox/virtualbox tag v7.2.20 (f2792cf44f663989818507e36d3db5f978523c5e)
  • ApplianceImplImport.cpp 802-851, 1043-1053, 4169-4171
  • ApplianceImpl.cpp 1126-1160
  • CWE-22

License

GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.

Download Tool