HTML files in Cover Image Uploads

Hello All,

We’ve had a user some upload html files to the cover image directory that calls some javascript and serves pages that do not align with what we have going on here.

I have since deleted the html files and would like to know if there is a way to prevent this and also to identify which user uploaded these html files. How would also help a lot.

We are using OJS 3.5.0.3

Any assistance in this is greatly appreciated. Thank you in advance.

This is a critical security vulnerability on your website, I recommend you contact the IT team to resolve it as soon as possible. Normal users can’t upload html files to this directory.

@J-remy - further to @Thelurydead’s comments, we also have recommendations for securing OJS appropriately: https://docs.pkp.sfu.ca/admin-guide/en/securing-your-system

-Roger
PKP Team

Hi @J-remy,

We recently experienced what sounds like the same issue at Temple University Libraries, although we’re running OJS 3.4.0-9.

In our case, we discovered unauthorized HTML files in our public cover-image directories. Our investigation identified a potential issue with server-side file validation, which we were able to reproduce in our QA environment.

As a mitigation, we developed an OJS plugin that performs additional validation of cover-image uploads, ensuring that only valid image files are accepted.

You can find the plugin here:

Please note that the plugin was developed and tested against OJS 3.4.0-9. We haven’t verified compatibility with OJS 3.5.0-3.

In the meantime, I’d recommend removing any suspicious files, restricting public access to HTML files in upload directories, and reviewing potentially compromised accounts.

We’ve also reported the underlying issue to PKP Security for further investigation and hopefully an upstream fix. I’m intentionally leaving out the technical reproduction details while the issue is being investigated.

Hope this helps!