{"id":"CVE-2020-15247","published":"2020-11-23T19:35:14Z","modified":"2024-08-04T13:08:23Z","title":"Twig Sandbox Escape by authenticated users with access to editing CMS templates when safemode is enabled.","vendor":"octobercms","product":"october","tier":"tail","description":{"text":"October is a free, open-source, self-hosted CMS platform based on the Laravel PHP Framework. In October CMS from version 1.0.319 and before version 1.0.469, an authenticated backend user with the cms.manage_pages, cms.manage_layouts, or cms.manage_partials permissions who would normally not be permitted to provide PHP code to be executed by the CMS due to cms.enableSafeMode being enabled is able to write specific Twig code to escape the Twig sandbox and execute arbitrary PHP. This is not a problem for anyone that trusts their users with those permissions to normally write & manage PHP within the CMS by not having cms.enableSafeMode enabled, but would be a problem for anyone relying on cms.enableSafeMode to ensure that users with those permissions in production do not have access to write & execute arbitrary PHP. Issue has been patched in Build 469 (v1.0.469) and v1.1.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00294,"percentile":0.21988,"provenance":"source"},"cwes":[{"id":"CWE-862","name":"Missing Authorization"}],"references":[{"url":"https://github.com/octobercms/october/security/advisories/GHSA-94vp-rmqv-5875","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/octobercms/october/commit/4c650bb775ab849e48202a4923bac93bd74f9982","tags":["x_refsource_MISC"]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":4.4},{"name":"CVSS severity","points":3.64}]},"vendorSlug":"octobercms","affectedVersions":[{"vendor":"octobercms","product":"october","versions":[">= 1.0.319, < 1.0.469"]}],"affected":[{"ecosystem":"Packagist","package":"october/cms","vulnerableRanges":[">=1.0.319, <1.0.469"],"patched":["1.0.469"],"from":["GHSA-94vp-rmqv-5875"],"provenance":"source"}],"euvd":{"id":"EUVD-2020-1452","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-octobercms-october-cve-2017-16244","parents":[{"from":"CVE-2017-16244","to":"CVE-2020-15247","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["modules/cms/classes/Controller.php"],"commits":["https://github.com/octobercms/october/commit/4a6e0e1e0e2c3facebc17e0db38c5b4d4cb05bd0","https://github.com/octobercms/october/commit/4c650bb775ab849e48202a4923bac93bd74f9982"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2020-15247","to":"CVE-2020-26231","relation":"bypass","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"text","provenance":"source","relation":"bypass","quote":"A bypass of CVE-2020-15247 (fixed in 1.0.469 and 1.1.0) was discovered that has the same impact as CVE-2020-15247.","from":"CVE.org","in":"CVE-2020-26231"},{"kind":"osv-related","provenance":"source","id":"GHSA-r89v-cgv7-3jhx","via":"reference","url":"https://github.com/advisories/GHSA-94vp-rmqv-5875"},{"kind":"version-step","provenance":"source","package":"Packagist:october/cms","fromFixed":"1.0.469","toFixed":"1.0.470","daysApart":0},{"kind":"same-code","provenance":"machine","files":["modules/system/twig/SecurityPolicy.php"],"commits":["https://github.com/octobercms/october/commit/4c650bb775ab849e48202a4923bac93bd74f9982","https://github.com/octobercms/october/commit/d34fb8ab51108495a9a651b841202d935f4e12f7"],"basis":"shared file"},{"kind":"similar","provenance":"machine","score":0.99,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2020-5296","published":"2020-06-03","fixed":"1.0.466","kev":false,"link":{"from":"CVE-2020-5296","to":"CVE-2020-15247","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:october/cms","fromFixed":"1.0.466","toFixed":"1.0.469","daysApart":173}]}},{"cve":"CVE-2020-5297","published":"2020-06-03","fixed":"1.0.466","kev":false},{"cve":"CVE-2020-15246","published":"2020-11-23","fixed":"1.0.469","kev":false},{"cve":"CVE-2020-15247","published":"2020-11-23","fixed":"1.0.469","kev":false},{"cve":"CVE-2020-26231","published":"2020-11-23","fixed":"1.0.470","kev":false},{"cve":"CVE-2021-21264","published":"2021-05-03","fixed":"1.1.2","kev":false}],"package":"Packagist:october/cms"}}