Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2013-7345: The BEGIN regular expression in the awk script detector in magic/Magdir/commands in file before 5.15 uses mult

49
This month
MEDIUM 5.0WATCHLISTUPGRADEUPGRADEMITIGATE

CVE-2013-7345 is a medium-severity flaw (CVSS 5.0) affecting file, php, debian linux. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

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.

Why this priority

  • Public exploit reference
  • On your watchlist

A fixed release or distro patch exists.

Risk facts

CVSS score5.0 (Medium)
EPSS exploit chance3.0% (top 12%)
CISA exploited listNo
Published2014-03-24
Last modified2026-06-17
Publisher (CNA): MITRE · Vendor: christos zoulas · debian · php

Share: LinkedIn · X · Reddit

Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

christos zoulas file UPGRADE
Affected: < 5.15
Fixed in: 5.15
Safe to downgrade to: no unaffected older release
1. Check installed version
apt-cache policy file || rpm -q file || file --version
2. UPGRADE to 5.15 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade file
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade file
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
php php UPGRADE
Affected: >= 5.4.0 and < 5.4.27 · >= 5.5.0 and < 5.5.11
Fixed in: 5.4.27, 5.5.11
Safe to downgrade to: a release before 5.4.0
1. Check installed version
apt-cache policy php || rpm -q php || php --version
2. UPGRADE to 5.4.27 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade php
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade php
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 5.4.0 (Debian / Ubuntu)
apt-cache madison php sudo apt install php=<VERSION_BEFORE_5.4.0> sudo apt-mark hold php
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list php sudo dnf downgrade php-<VERSION_BEFORE_5.4.0> sudo dnf versionlock add php
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
debian debian linux MITIGATE
Affected: 6.0 · 7.0 · 8.0
Fixed in: no fixed release known
Safe to downgrade to: a release before 6.0
Check your OS release
cat /etc/os-release; uname -r
Debian / Ubuntu
sudo apt update && sudo apt full-upgrade
RHEL / Amazon Linux / Fedora
sudo dnf upgrade --refresh
Windows
Install the latest cumulative update from Windows Update
If no patch exists yet
OS downgrades are not safe. Apply the vendor mitigation from the advisory and restrict exposure.
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

Quick answers

How do I fix CVE-2013-7345?

file: upgrade to 5.15; php: upgrade to 5.4.27, 5.5.11; debian linux: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.

Is CVE-2013-7345 being exploited?

CVE-2013-7345 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.

What does CVE-2013-7345 affect?

CVE-2013-7345 affects file, php, debian linux. Severity is medium (CVSS 5.0). 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)

How urgent is CVE-2013-7345?

Priority 49/100. Public exploit reference; On your watchlist

Software pages

PHP vulnerabilities · Debian vulnerabilities

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.