Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getgrav/grav
  4. ›
  5. CVE-2021-29440

CVE-2021-29440: Improper Control of Generation of Code ('Code Injection')

April 16, 2021 (updated July 13, 2021)

Grav is a file based Web-platform. Twig processing of static pages can be enabled in the front matter by any administrative user allowed to create or edit pages. As the Twig processor runs unsandboxed, this behavior can be used to gain arbitrary code execution and elevate privileges on the instance. The issue was addressed in version 1.7.11.

References

  • packetstormsecurity.com/files/162987/Grav-CMS-1.7.10-Server-Side-Template-Injection.html
  • github.com/advisories/GHSA-g8r4-p96j-xfxc
  • github.com/getgrav/grav/security/advisories/GHSA-g8r4-p96j-xfxc
  • nvd.nist.gov/vuln/detail/CVE-2021-29440
  • packagist.org/packages/getgrav/grav

Code Behaviors & Features

Detect and mitigate CVE-2021-29440 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.7.10

Fixed versions

  • 1.7.11

Solution

Upgrade to version 1.7.11 or above.

Impact 7.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/getgrav/grav/CVE-2021-29440.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:10 +0000.