CVE-2023-5626
📋 TL;DR
This Cross-Site Request Forgery (CSRF) vulnerability in PKP Open Journal Systems (OJS) allows attackers to trick authenticated users into performing unintended actions on their behalf. Users with administrative or editorial privileges in OJS installations are affected. The vulnerability exists in the web interface where state-changing requests lack proper CSRF protection.
💻 Affected Systems
- PKP Open Journal Systems (OJS)
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers could create new administrator accounts, modify journal content, delete articles, or change system configurations leading to complete compromise of the journal management system.
Likely Case
Attackers could modify article metadata, change user permissions, or alter journal settings without the victim's knowledge while they're logged into OJS.
If Mitigated
With proper CSRF tokens and same-origin policies, the attack would fail as the malicious requests would be rejected by the server.
🎯 Exploit Status
CSRF attacks are well-understood and easy to implement. The vulnerability requires the victim to be authenticated and visit a malicious page while logged into OJS.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.3.0-16 and later
Vendor Advisory: https://github.com/pkp/ojs/commit/99a9f393190383454aa5ddffedffc89596f6c682
Restart Required: No
Instructions:
1. Backup your OJS installation and database. 2. Download OJS version 3.3.0-16 or later from the official repository. 3. Replace the existing installation files with the patched version. 4. Clear browser caches and test functionality.
🔧 Temporary Workarounds
Implement CSRF Protection Middleware
allAdd custom CSRF token validation to all state-changing endpoints
# Requires modifying OJS source code to add CSRF tokens to forms and validate them server-side
SameSite Cookie Configuration
allConfigure session cookies with SameSite=Strict attribute
# In OJS configuration or web server config, set session.cookie_samesite = 'Strict'
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to detect and block CSRF patterns
- Require re-authentication for sensitive administrative actions
🔍 How to Verify
Check if Vulnerable:
Check OJS version in admin dashboard or examine config.THEME_VERSION in config.inc.php
Check Version:
grep -i 'version' config.inc.php | grep -i 'ojs'
Verify Fix Applied:
Verify version is 3.3.0-16 or later and test that forms include CSRF tokens (hidden input fields with random values)
📡 Detection & Monitoring
Log Indicators:
- Multiple state-changing requests from same IP without corresponding GET requests
- Administrative actions from unexpected user agents or referrers
Network Indicators:
- HTTP POST requests to OJS endpoints without Referer header matching OJS domain
- Requests with missing or invalid CSRF tokens in patched versions
SIEM Query:
source="ojs_access.log" | where (http_method="POST" AND NOT csrf_token=*) OR (http_method="POST" AND NOT referer CONTAINS "ojs-domain")