Summary
When creating a file-hosted hidden volume, VeraCrypt can write raw zeroed sectors directly into the container file. These sectors can appear at predictable 128 MiB intervals inside an area that should look like random ciphertext. No encrypted content is compromised, and VeraCrypt's encryption itself is not weakened, but the zeroed sectors can weaken plausible deniability protections via a deterministic pattern.
Details
Hidden volume creation forces volParams->quickFormat = TRUE in src/Common/Format.c. For file-hosted volumes, FormatNoFs() and FormatFat() receive quickFormat == TRUE and bDevice == FALSE.
In the quick-format file-container branches, both functions seek through the target and call WriteFile() directly with a zeroed sector buffer:
src/Common/Format.c: FormatNoFs() quick-format branch
src/Common/Fat.c: FormatFat() quick-format branch
This 128 MiB zero-sector write behavior was added in 579ce2fd31f01b0befba947ed863ed1d5e4be3f0 to improve Windows quick-format progress reporting and force allocation of each 128 MiB chunk in file containers.
These direct writes do not use the normal formatting path, where buffered sectors are transformed by EncryptDataUnits() before being written. As a result, hidden file-hosted volumes can contain raw zero sectors in the hidden volume data area.
PoC
- Create a file-hosted outer volume.
- Create a hidden volume inside it with a size greater than 128 MiB.
- In the hidden volume format options, choose either no filesystem, which reaches
FormatNoFs(), or FAT, which reaches FormatFat().
- Complete hidden volume creation. Hidden volumes force quick format internally; no separate quick-format selection is required.
- Inspect the host file at offsets within the hidden volume data area.
- Observe zeroed sectors at predictable 128 MiB intervals written by the quick-format file-container path.
Impact
This is a hidden-volume deniability weakness / security feature bypass. Users creating file-hosted hidden volumes are impacted because the host file may contain deterministic plaintext markers where random-looking encrypted data is expected. The issue does not disclose hidden volume contents or reduce encryption strength, but it can create forensic evidence inconsistent with VeraCrypt's hidden-volume threat model.
Disclaimer: This vulnerability was identified with assistance from OpenAI Codex Security using GPT-5.5 xhigh, then verified through multiple iterations and reviewed with Claude Opus 4.8 Max. All AI review used flagship models at the highest reasoning settings.
Summary
When creating a file-hosted hidden volume, VeraCrypt can write raw zeroed sectors directly into the container file. These sectors can appear at predictable 128 MiB intervals inside an area that should look like random ciphertext. No encrypted content is compromised, and VeraCrypt's encryption itself is not weakened, but the zeroed sectors can weaken plausible deniability protections via a deterministic pattern.
Details
Hidden volume creation forces
volParams->quickFormat = TRUEinsrc/Common/Format.c. For file-hosted volumes,FormatNoFs()andFormatFat()receivequickFormat == TRUEandbDevice == FALSE.In the quick-format file-container branches, both functions seek through the target and call
WriteFile()directly with a zeroed sector buffer:src/Common/Format.c:FormatNoFs()quick-format branchsrc/Common/Fat.c:FormatFat()quick-format branchThis 128 MiB zero-sector write behavior was added in
579ce2fd31f01b0befba947ed863ed1d5e4be3f0to improve Windows quick-format progress reporting and force allocation of each 128 MiB chunk in file containers.These direct writes do not use the normal formatting path, where buffered sectors are transformed by
EncryptDataUnits()before being written. As a result, hidden file-hosted volumes can contain raw zero sectors in the hidden volume data area.PoC
FormatNoFs(), or FAT, which reachesFormatFat().Impact
This is a hidden-volume deniability weakness / security feature bypass. Users creating file-hosted hidden volumes are impacted because the host file may contain deterministic plaintext markers where random-looking encrypted data is expected. The issue does not disclose hidden volume contents or reduce encryption strength, but it can create forensic evidence inconsistent with VeraCrypt's hidden-volume threat model.
Disclaimer: This vulnerability was identified with assistance from OpenAI Codex Security using GPT-5.5 xhigh, then verified through multiple iterations and reviewed with Claude Opus 4.8 Max. All AI review used flagship models at the highest reasoning settings.