The vulnerability is a relative path traversal in Concrete CMS versions 9.5.0 and below. The vulnerability exists in the ptComposerFormLayoutSetControlCustomTemplate field when saving page type composer form layouts. The analysis of the security patch f22b9dff59454391a50a255a39995bf635deea9e for version 9.5.1 reveals the exact location of the vulnerability.
The file concrete/controllers/backend/page/type/composer/form/edit_control/save.php contains the vulnerable code. Specifically, the getPostedTemplate method within the Concrete\Controller\Backend\Page\Type\Composer\Form\EditControl\Save class was not properly sanitizing the user-provided template path. The original code only used a generic string sanitization function, which was not sufficient to prevent path traversal sequences like ../.
The patch introduces a check to ensure that the template provided by the user exists in a predefined list of allowed templates. This prevents an attacker from supplying an arbitrary path.
The save method in the same class calls getPostedTemplate and uses its return value, making it a key part of the exploitation chain. Therefore, both getPostedTemplate and save are identified as the vulnerable functions that would appear in a runtime profile during exploitation.