1

With the latest SUPEE-9767 patch, which symlinks are actually affected?

I assume symlinks in /var and /media are ok. What about symlinks in app/etc/modules? Is it just symlinked .phtml template files that are the problem?

Just trying to pinpoint which symlinks may cause issues before patches are applied...

1 Answer 1

3

When we talk about symlinks and Magento we are referring to any symlinked Magento files (especially template files) that are included as part of the php compilation and execution process.

If you read the following two articles it will become clearer.

Magento validates the template view path in app/code/core/Mage/Core/Block/Template.php with it's real folder path and if symlinks are not enabled, and the validation fails, it does not include the template file.

All Magento templates that are symlinked will be affected if symlinks are disabled after installing the patch. Magento modules that do not include templates may not be affected.

Enabling symlinks allows template files to be loaded outside of app/design and this is the security risk Magento are mitigating with the patch. A malicious user with admin access could enable a malicious symlinked template and remotely execute code on your server.

There is however nothing to stop you manually enabling symlinks and doing your own risk assessment as to the threats to your business this may bring.

If you manage your modules with modman then you must reenable symlinks as your store may be broken, which quite possibly is a greater threat to your business than a possible symlink vulnerability.

You can further mitigate the threat associated with symlinks being enabled by using a patched version of app/code/core/Mage/Core/Block/Template.phpfrom the modman author.

2
  • So, if a file in app/etc/modules were symlinked like local.xml or another extension's xml file, would that be ok as they are not template files? I see some modman installs where the only symlinked files are in app/etc/modules... Commented Jul 17, 2017 at 18:38
  • 2
    With 1.9.3.4 symlinked modules continue to work with symlinks disabled if they do not include template files, but you should of course fully test this yourself.
    – paj
    Commented Jul 18, 2017 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.