Advisory

GHSA-5mv2-rx3q-4w2v

Also known as: CVE-2022-23614

Summary

Code injection in Twig

Details

Description

When in a sandbox mode, the arrow parameter of the sort filter must be a closure to avoid attackers being able to run arbitrary PHP functions.

Resolution

We now disallow calling non Closure in the sort filter like we already did for some other filters.

Credits

We would like to thank Marlon Starkloff for reporting the issue and Fabien Potencier for fixing the issue.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2022-02-10 22:21 UTC
Modified
2024-02-16 08:18 UTC

Affected packages and fixes

twig/twig

Packagist · All systems

Affected

  • introduced 2.0.0, fixed 2.14.11 (ecosystem)

Fixed versions

2.14.11

Fix

The export has no generic command for this ecosystem.

twig/twig

Packagist · All systems

Affected

  • introduced 3.0.0, fixed 3.3.8 (ecosystem)

Fixed versions

3.3.8

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences