Security Resilience

CVE-2023-37897

Getgrav Grav 1.7.42 … 1.7.42.1

Public PoC
Published
18 July 2023
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 7.2
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.028 87th percentile
Risk Priority 57 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-37897 is a high-severity Injection (CWE-74) vulnerability in Getgrav Grav. Its CVSS base score is 7.2 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked in the top 13% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Grav is a file-based Web-platform built in PHP. Grav is subject to a server side template injection (SSTI) vulnerability. The fix for another SSTI vulnerability using `|map`, `|filter` and `|reduce` twigs implemented in the commit `71bbed1` introduces bypass of the…

more

denylist due to incorrect return value from `isDangerousFunction()`, which allows to execute the payload prepending double backslash (`\\`). The `isDangerousFunction()` check in version 1.7.42 and onwards retuns `false` value instead of `true` when the `\` symbol is found in the `$name`. This vulnerability can be exploited if the attacker has access to: 1. an Administrator account, or 2. a non-administrator, user account that has Admin panel access and Create/Update page permissions. A fix for this vulnerability has been introduced in commit `b4c6210` and is included in release version `1.7.42.2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1557 Adversary-in-the-Middle Credential Access
Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as [Network Sniffing](https://attack.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-35728Shared CWE-74
CVE-2023-25141Shared CWE-74
CVE-2023-29518Shared CWE-74
CVE-2024-46983Shared CWE-74
CVE-2023-40035Shared CWE-74
CVE-2023-4818Shared CWE-74
CVE-2023-49328Shared CWE-74
CVE-2024-34544Shared CWE-74
CVE-2024-1619Shared CWE-74
CVE-2024-23828Shared CWE-74

Affected Assets

getgrav
grav
1.7.42, 1.7.42.1

Mitigating Controls

Likely Mitigating Controls

Our mappings. Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-74

Developer assessments and testing (including injection-focused techniques) identify improper neutralization of special elements, and the verifiable flaw remediation corrects them pre-deployment.

addresses: CWE-74

Identifies indicators of injection attacks (command, SQL, LDAP, etc.) via anomaly and attack monitoring.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices such as code review, unit testing, and static analysis directly prevent incorrect status codes from being returned.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development catches injection vulnerabilities before release.

prevents

Training can make developers more careful about return-value handling and status-code semantics, reducing some instances of this subtle implementation bug, but most occurrences (like the Apple 'goto fail' defect) are accidental code errors that escape review and testing, so training moves only a minority of instances.

finds

Monitoring activities can identify active injection attacks after they occur.

prevents

Secure coding standards require proper neutralization of special elements, directly addressing CWE-74.

finds

A.8.8's disclosure/scanning reach catches CWE-393 only where a vulnerable component already has a published CVE or advisory, while most wrong-status-code defects are first-party implementation logic never disclosed, so it finds a minority of latent instances.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-74, a class-level weakness, and none of its children carries one either.

References