Skip to content
Path traversal Write-up Advanced

PKP-WAL <= 3.4.0-3 (NativeImportExportPlugin) Remote Code Execution Vulnerability

The native import/export plugin's cover-image parsing method reads a locale attribute from an uploaded XML node and uses it to build a file path without proper validation. An attacker able to submit a crafted import file could therefore influence where the application reads or writes files, potentially leading to remote code execution.

karmainsecurity.com

Published on karmainsecurity.com

PKP Web Application Library (aka PKP-WAL or pkp-lib) version 3.4.0-3 and prior versions, as used in Open Journal Systems (OJS), Open Monograph Press (OMP), and Open Preprint Systems (OPS) before versions 3.4.0-4 or 3.3.0-16.

The author, on karmainsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the parsePublicationCover method uses an attacker-controlled locale attribute from the XML node to construct a file path without sanitising it, allowing path manipulation.

What the attacker needed

Ability to submit a native import file; access to the import/export plugin

The fix

It should be fixed by validating and sanitising the locale attribute before using it in file paths, and the text notes fixed versions 3.4.0-4 and 3.3.0-16.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This software lets editors import and export article data using XML files. A part of the code that handles cover images trusts a value inside that file to decide a file location, instead of checking it. If someone can upload a malicious import file, they may be able to make the server touch files it should not, which can lead to running their own code.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.