CVE-2019-9942 json
Twig Sandbox Information Disclosure
published 2019-03-23 7 y ago modified 2026-06-17 4 mo ago also GHSA-vxrc-68xx-x48g , EUVD-2022-1558
- cvss
- 3.7
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist twig/twig 1.38.0, 2.7.0
- symfony twig 1.38.0, 2.7.0
- twig Ubuntu Pro 16.04 LTS 1.23.1-1ubuntu4+esm1
- twig Ubuntu Pro 18.04 LTS 2.4.6-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2019-9942
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2019-9942 updated cvss 4.3
php-twig: sandbox information disclosure
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.41% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | <1.38.0 >=2.0.0, <2.7.0 |
1.38.0 2.7.0 |
Classification
- Weakness
-
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
References
-
github.com
/twigphp/Twig/commit/eac5422956e1dcca89a3669a03a3ff32f0502077
web, patch, third-party-advisory
-
symfony.com
/blog/twig-sandbox-information-disclosure
web, patch, vendor-advisory
-
debian.org
/security/2019/dsa-4419
vendor-advisory, web, third-party-advisory
-
seclists.org
/bugtraq/2019/Mar/60
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2019-9942
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2019-9942.yaml
web
-
github.com
/twigphp/Twig
package
Sources
- CVE List CVE-2019-9942
- GitHub Advisory GHSA-vxrc-68xx-x48g
- NVD CVE-2019-9942
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.