Deark - Security information

[This document is a draft. It might be added to the Deark distribution at some point. Last modified or reviewed: 2026-08-16.]

Deark is intended to be generally safe to use with untrusted input files. However, it is written in a language that isn’t memory-safe, and its default mode of operation necessarily has an extremely large attack surface. It undoubtedly has some security flaws.

But Deark is just a hobbyist project, with no real operating budget, and no security response team.

Even if it had memory safety, it could still have security flaws, such as path traversal errors (it could write files where it shouldn’t), confusion related to Unicode filenames, and various denial of service-type errors (infinite loops, excessive resource use, ...).

Even when Deark works as designed, it may behave in an unexpected and disorderly fashion. For example, it might create thousands of output files that you weren’t expecting. A tiny file might decompress to a very large one. Etc.

We don’t want to scare you off from using Deark. Unless you’re exposing it to files that could have been deliberately crafted to attack it, it’s probably fine. We just want to be honest about what to expect.

The owners of the project declare their intention to fix known security issues within a reasonable amount of time. But this is not a promise. And the fix might not trigger an immediate new official binary release. The project does not have the resources to make a new binary release every day, so the fix might be only in the source code for some time.

Tips for using Deark more securely

Command-line options that can improve security

For more information about these options, refer to the “readme” file.

-zipCreate only one output file. Greatly reduces the chance of bad behavior, and eliminates path traversal vulnerabilities.
-onlymodsBest option for reducing the attack surface, but you have to know the input format, and can break things unexpectedly.
-mGood option for reducing the attack surface, but you have to know the input format.
-onlydetectSimilar to -m, but errors will be handled differently.
-disablemodsCan protect against a known vulnerability, or a high risk module.
-nodetectCan protect against a known vulnerability, or a high risk module.
-nonamesSlightly reduces the chance of path-traversal and other filename-related issues.
-nDon’t overwrite existing files.
-maxfilesLimit the number of output files.
-mainDon’t extract certain “auxiliary” files.
-getWrite only one output file.
-tUse a specfic name for the output file.
-maxfilesizeLimit the output file size.
-maxtotalsizeLimit the total output size.
-maxdimLimit the size of images.
-lDon’t actually write any files.
-idDon’t actually write any files.

Reporting security issues

Preferably, send reports by email, especially if the vulnerability seems easy to exploit. Using the public bug tracker is, however, not forbidden.


[Back to main Deark page]