{"id":"UBUNTU-CVE-2019-9942","details":"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.","modified":"2026-02-04T02:40:00.507285Z","published":"2019-03-23T15:29:00Z","related":["USN-5947-1"],"upstream":["CVE-2019-9942"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2019-9942"},{"type":"REPORT","url":"https://github.com/twigphp/Twig/commit/eac5422956e1dcca89a3669a03a3ff32f0502077"},{"type":"REPORT","url":"https://symfony.com/blog/twig-sandbox-information-disclosure"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5947-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2019-9942"}],"affected":[{"package":{"name":"twig","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/twig@1.23.1-1ubuntu4+esm1?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.23.1-1ubuntu4+esm1"}]}],"versions":["1.20.0-1","1.23.1-1ubuntu1","1.23.1-1ubuntu4"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_version":"1.23.1-1ubuntu4+esm1","binary_name":"php-twig"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-9942.json"}},{"package":{"name":"twig","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/twig@2.4.6-1ubuntu0.1~esm1?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.6-1ubuntu0.1~esm1"}]}],"versions":["1.24.0-2ubuntu1","2.4.4-2ubuntu1","2.4.6-1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_version":"2.4.6-1ubuntu0.1~esm1","binary_name":"php-twig"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-9942.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"},{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"},{"type":"Ubuntu","score":"medium"}]}