All reports
Medium

file: extensive backtracking in awk rule regular expression

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2013-7345

Probability of exploitation in the next 30 days: 3.04%

FIRST EPSS · 2026-11-21

Description

The BEGIN regular expression in the awk script detector in magic/Magdir/commands in file before 5.15 uses multiple wildcards with unlimited repetitions, which allows context-dependent attackers to cause a denial of service (CPU consumption) via a crafted ASCII file that triggers a large amount of backtracking, as demonstrated via a file with many newline characters.

A denial of service flaw was found in the File Information (fileinfo) extension rules for detecting AWK files. A remote attacker could use this flaw to cause a PHP application using fileinfo to consume an excessive amount of CPU.