what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

PKP-WAL 3.4.0-3 Remote Code Execution

PKP-WAL 3.4.0-3 Remote Code Execution
Posted Dec 15, 2023
Authored by EgiX | Site karmainsecurity.com

PKP Web Application Library (PKP-WAL) versions 3.4.0-3 and below, 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, suffer from a NativeImportExportPlugin related remote code execution vulnerability.

tags | exploit, remote, web, code execution
advisories | CVE-2023-47271
SHA-256 | 894453dd71b738c757ad44c73e02be6e0af26e1e261f945b9dc8f20a9ebb348e

PKP-WAL 3.4.0-3 Remote Code Execution

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


[-] Software Links:

https://pkp.sfu.ca
https://github.com/pkp/pkp-lib


[-] Affected Versions:

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.


[-] Vulnerabilities Description:

The vulnerability is located in the
/plugins/importexport/native/filter/PKPNativeFilterHelper.php script.
Specifically, into the
"PKPNativeFilterHelper::parsePublicationCover()" method:

100. public function parsePublicationCover($filter, $node, $object)
101. {
102. $deployment = $filter->getDeployment();
103.
104. $context = $deployment->getContext();
105.
106. $locale = $node->getAttribute('locale');
107. if (empty($locale)) {
108. $locale = $context->getPrimaryLocale();
109. }
110.
111. $coverImagelocale = [];
112. $coverImage = [];
113.
114. for ($n = $node->firstChild; $n !== null; $n = $n->nextSibling) {
115. if ($n instanceof DOMElement) {
116. switch ($n->tagName) {
117. case 'cover_image':
118. $coverImage['uploadName'] = $n->textContent;
119. break;
120. case 'cover_image_alt_text':
121. $coverImage['altText'] = $n->textContent;
122. break;
123. case 'embed':
124. $publicFileManager = new PublicFileManager();
125. $filePath =
$publicFileManager->getContextFilesPath($context->getId()) . '/' .
$coverImage['uploadName'];
126. file_put_contents($filePath,
base64_decode($n->textContent));
127. break;

User input passed through the cover image tags of the import XML file
is not properly sanitized before being used at line 118 to construct a
variable, which is later used as the final part of the filepath used
in a call to the file_put_contents() PHP function at line 126. This
can be exploited to write/overwrite arbitrary files on the web server
via Path Traversal sequences, leading to execution of arbitrary PHP
code.

Successful exploitation of this vulnerability requires an account with
permissions to access the "Import/Export" plugin, such as a Journal
Editor or Production Editor user.


[-] Solution:

Upgrade to version 3.4.0-4 or later.


[-] Disclosure Timeline:

[14/10/2023] - Vendor notified
[26/10/2023] - Vendor fixed the issue and opened a public GitHub
issue: https://github.com/pkp/pkp-lib/issues/9464
[05/11/2023] - CVE identifier assigned
[17/11/2023] - Version 3.4.0-4 released
[14/12/2023] - Publication of this advisory


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2023-47271 to this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2023-14
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close