Skip to content
Fencer Intel
medium 5.0

CVE-2013-7345 json

The BEGIN regular expression in the awk script detector in magic/Magdir/commands in file before 5.15 uses multiple wildcards with unlimited…

published 2014-03-23 12 y ago modified 2026-06-17 4 mo ago also EUVD-2013-7117

cvss
5.0
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.0%
EPSS 3.0% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

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.

Patch / fix

  • christos_zoulas file 5.15
  • php php 5.4.27, 5.5.11
  • file Debian 14, Debian 13, Debian 12 1:5.17-0.1

debian advisories DEBIAN-CVE-2013-7345

  • file Ubuntu 14.04 LTS 1:5.14-2ubuntu3.1

ubuntu advisories UBUNTU-CVE-2013-7345

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • php54-php RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el6
  • php54-php RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el7
  • php54-php-gd RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el6
  • php54-php-gd RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el7
  • php54-php-cli RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el6
  • php54-php-cli RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el7
  • php54-php-dba RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el6
  • php54-php-dba RHEL 1 SOFTWARE_COLLECTIONS 5.4.16-22.el7

red hat advisories RHSA-2014:1765RHSA-2014:1013

  • php7 openSUSE Tumbleweed 7.0.14-1.4
  • php5 openSUSE Tumbleweed 5.6.28-1.1
  • php8 openSUSE Tumbleweed 8.0.11-1.1

opensuse advisories openSUSE-SU-2024:10290-1openSUSE-SU-2024:10344-1openSUSE-SU-2024:11169-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2013-7345 updated cvss 4.3

file: extensive backtracking in awk rule regular expression

  • Red Hat Software Collections php55-php, php55-php-gd, php55-php-cli, php55-php-dba, php55-php-fpm, php55-php-gmp, +20 more
    affected: no fix available
  • Red Hat Enterprise Linux Client Optional (v. 7) php 5.4.16-23.el7_0, php-gd 5.4.16-23.el7_0, php-cli 5.4.16-23.el7_0, php-dba 5.4.16-23.el7_0, php-fpm 5.4.16-23.el7_0, php-pdo 5.4.16-23.el7_0, +18 more Red Hat Enterprise Linux ComputeNode Optional (v. 7) php 5.4.16-23.el7_0, php-gd 5.4.16-23.el7_0, php-cli 5.4.16-23.el7_0, php-dba 5.4.16-23.el7_0, php-fpm 5.4.16-23.el7_0, php-pdo 5.4.16-23.el7_0, +18 more Red Hat Enterprise Linux Server (v. 7) php 5.4.16-23.el7_0, php-gd 5.4.16-23.el7_0, php-cli 5.4.16-23.el7_0, php-pdo 5.4.16-23.el7_0, php-xml 5.4.16-23.el7_0, php-ldap 5.4.16-23.el7_0, +8 more Red Hat Enterprise Linux Server Optional (v. 7) php-dba 5.4.16-23.el7_0, php-fpm 5.4.16-23.el7_0, php-intl 5.4.16-23.el7_0, php-snmp 5.4.16-23.el7_0, php-bcmath 5.4.16-23.el7_0, php-pspell 5.4.16-23.el7_0, +4 more Red Hat Enterprise Linux Workstation (v. 7) php 5.4.16-23.el7_0, php-gd 5.4.16-23.el7_0, php-cli 5.4.16-23.el7_0, php-pdo 5.4.16-23.el7_0, php-xml 5.4.16-23.el7_0, php-ldap 5.4.16-23.el7_0, +8 more Red Hat Enterprise Linux Workstation Optional (v. 7) php-dba 5.4.16-23.el7_0, php-fpm 5.4.16-23.el7_0, php-intl 5.4.16-23.el7_0, php-snmp 5.4.16-23.el7_0, php-bcmath 5.4.16-23.el7_0, php-pspell 5.4.16-23.el7_0, +4 more
    fixed: vendor fix RHSA-2014:1013
  • Red Hat Software Collections 1 for Red Hat Enterprise Linux Server (v. 6) php54-php 5.4.16-22.el6, php54-php-gd 5.4.16-22.el6, php54-php-cli 5.4.16-22.el6, php54-php-dba 5.4.16-22.el6, php54-php-fpm 5.4.16-22.el6, php54-php-pdo 5.4.16-22.el6, +18 more Red Hat Software Collections 1 for Red Hat Enterprise Linux Server (v. 7) php54-php 5.4.16-22.el7, php54-php-gd 5.4.16-22.el7, php54-php-cli 5.4.16-22.el7, php54-php-dba 5.4.16-22.el7, php54-php-fpm 5.4.16-22.el7, php54-php-pdo 5.4.16-22.el7, +16 more Red Hat Software Collections 1 for Red Hat Enterprise Linux Server EUS (v. 6.4) php54-php 5.4.16-22.el6, php54-php-gd 5.4.16-22.el6, php54-php-cli 5.4.16-22.el6, php54-php-dba 5.4.16-22.el6, php54-php-fpm 5.4.16-22.el6, php54-php-pdo 5.4.16-22.el6, +18 more Red Hat Software Collections 1 for Red Hat Enterprise Linux Server EUS (v. 6.5) php54-php 5.4.16-22.el6, php54-php-gd 5.4.16-22.el6, php54-php-cli 5.4.16-22.el6, php54-php-dba 5.4.16-22.el6, php54-php-fpm 5.4.16-22.el6, php54-php-pdo 5.4.16-22.el6, +18 more Red Hat Software Collections 1 for Red Hat Enterprise Linux Server EUS (v. 6.6) php54-php 5.4.16-22.el6, php54-php-gd 5.4.16-22.el6, php54-php-cli 5.4.16-22.el6, php54-php-dba 5.4.16-22.el6, php54-php-fpm 5.4.16-22.el6, php54-php-pdo 5.4.16-22.el6, +18 more Red Hat Software Collections 1 for Red Hat Enterprise Linux Workstation (v. 6) php54-php 5.4.16-22.el6, php54-php-gd 5.4.16-22.el6, php54-php-cli 5.4.16-22.el6, php54-php-dba 5.4.16-22.el6, php54-php-fpm 5.4.16-22.el6, php54-php-pdo 5.4.16-22.el6, +18 more
    +1 more products
    Red Hat Software Collections 1 for Red Hat Enterprise Linux Workstation (v. 7) php54-php 5.4.16-22.el7, php54-php-gd 5.4.16-22.el7, php54-php-cli 5.4.16-22.el7, php54-php-dba 5.4.16-22.el7, php54-php-fpm 5.4.16-22.el7, php54-php-pdo 5.4.16-22.el7, +16 more
    fixed: vendor fix RHSA-2014:1765
  • Red Hat Enterprise Linux 5 php, rpm, file, php53, cdrtools Red Hat Enterprise Linux 6 php, file, php-gd, php-cli, php-dba, php-fpm, +23 more Red Hat Enterprise Linux 7 file, file-libs, python-magic
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.04% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • github.com https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c referenced PoC, tagged "exploit" by a source, unverified
  • bugs.gw.com http://bugs.gw.com/view.php?id=164 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.