CVE-2021-37626

7.2 HIGH

📋 TL;DR

This vulnerability allows untrusted back-end users in Contao CMS to execute arbitrary PHP code via insert tags. It affects installations where back-end users with content editing permissions can modify fields displayed in the front end. The vulnerability enables PHP file inclusion attacks.

💻 Affected Systems

Products:
  • Contao CMS
Versions: Versions before 4.4.56, 4.9.18, and 4.11.7
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with untrusted back-end users who can modify front-end displayed fields

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or website defacement

🟠

Likely Case

Unauthorized PHP code execution allowing back-end privilege escalation and content manipulation

🟢

If Mitigated

Limited impact if only trusted users have back-end access or insert tags are properly sanitized

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires back-end user credentials with content editing permissions

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.4.56, 4.9.18, or 4.11.7

Vendor Advisory: https://contao.org/en/security-advisories/php-file-inclusion-via-insert-tags.html

Restart Required: No

Instructions:

1. Backup your Contao installation and database. 2. Update to Contao 4.4.56, 4.9.18, or 4.11.7 via Composer or manual update. 3. Clear the cache. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict back-end access

all

Disable login for untrusted back-end users to prevent exploitation

Sanitize insert tags

all

Implement input validation to filter malicious insert tags in content fields

🧯 If You Can't Patch

  • Immediately revoke back-end access for all untrusted users
  • Implement strict input validation on all content fields that accept insert tags

🔍 How to Verify

Check if Vulnerable:

Check Contao version via admin panel or by examining the composer.json file

Check Version:

php vendor/contao/core-bundle/src/ContaoCoreBundle.php --version

Verify Fix Applied:

Confirm version is 4.4.56, 4.9.18, or 4.11.7 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unusual PHP file inclusion attempts in web server logs
  • Suspicious insert tag patterns in content updates

Network Indicators:

  • Unexpected PHP file requests containing insert tag patterns

SIEM Query:

web_access_logs WHERE uri CONTAINS 'insert_tags' AND uri CONTAINS '.php'

🔗 References

📤 Share & Export