# GHSA-GV3C-QHXR-HH56: Sandbox property allow-list bypass via html\_cva() variant values

- Database: GitHub
- Severity: CVSS 2.3 (Low)
- Published: 2026-11-24
- Modified: 2026-11-24

## Tracked as

- [CVE-2026-133769](https://cve.now/CVE-2026-133769.md): Twig HTML Extra authorization bypass in sandbox property allow-list

## Affected versions

- twig/html-extra (Packagist): from 3.12.0, fixed in 3.31.1

## Description

### Description

`Cva::apply()` converted the values of variants, default variants and compound variants with `(array)`. These values come from the arguments of `html_cva()`. A sandboxed template could therefore pass any object of its context, and print the private and protected properties of that object:

```twig
{{ html_cva('base', {c: {p: user}}).apply({c: 'p'}) }}
```

Variant maps that are `ArrayAccess` objects were also read with a key that the template chooses, without the property check of the sandbox. The template then printed the offsets that the object returned.

Applications are affected when the sandbox allows the `html_cva` function and the `apply` method of `Twig\Extra\Html\Cva`.

### Resolution

A value that isn't an array is now treated as a single item, so objects are dropped and never match a variant. Variant maps are also only used when they're arrays.

The patch for this issue is available [here](https://github.com/twigphp/Twig/commit/ead08daef16e3a0b08d196717e929fc2ebd2fb11) for branch 3.x.

### Credits

We would like to thank Fabien Potencier for reporting the issue and providing the fix.

## References

- https://github.com/twigphp/Twig/security/advisories/GHSA-gv3c-qhxr-hh56

Page: https://cve.now/GHSA-GV3C-QHXR-HH56

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
