Advisory

GHSA-jjxq-ff2g-95vh

Also known as: CVE-2024-51755

Summary

Twig has unguarded calls to __isset() and to array-accesses when the sandbox is enabled

Details

Description

In a sandbox, and attacker can access attributes of Array-like objects as they were not checked by the security policy.
They are now checked via the property policy and the __isset() method is now called after the security check.
This is a BC break.

Resolution

The sandbox mode now ensures access to array-like's properties is allowed.

The patch for this issue is available here for the 3.11.x branch, and here for the 3.x branch.

Credits

We would like to thank Jamie Schouten for reporting the issue and Nicolas Grekas for providing the fix.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2024-11-06 19:52 UTC
Modified
2024-11-12 19:45 UTC

Affected packages and fixes

twig/twig

Packagist · All systems

Affected

  • introduced 0, fixed 3.11.2 (ecosystem)

Fixed versions

3.11.2

Fix

The export has no generic command for this ecosystem.

twig/twig

Packagist · All systems

Affected

  • introduced 3.12, fixed 3.14.1 (ecosystem)

Fixed versions

3.14.1

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