Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-2431: Changeset 2762092 for download-manager – WordPress Plugin Repository

The Download Manager plugin for WordPress is vulnerable to arbitrary file deletion in versions up to, and including 3.2.50. This is due to insufficient file type and path validation on the deleteFiles() function found in the ~/Admin/Menu/Packages.php file that triggers upon download post deletion. This makes it possible for contributor level users and above to supply an arbitrary file path via the 'file[files]' parameter when creating a download post and once the user deletes the post the supplied arbitrary file will be deleted. This can be used by attackers to delete the /wp-config.php file which will reset the installation and make it possible for an attacker to achieve remote code execution on the server.

CVE
#wordpress#php#rce#auth

Timestamp:

07/27/2022 03:26:39 AM (6 weeks ago)

codename065

Message:

3.2.51 - 2022.07.27

  • Revalidated attached file to avoid any blocked file type attachment

Location:

download-manager/trunk

Files:

  • download-manager.php (2 diffs)
  • readme.txt (2 diffs)
  • src/Admin/Menu/Packages.php (3 diffs)
  • src/AssetManager/AssetManager.php (1 diff)

Legend:

Unmodified

Added

Removed

  • download-manager/trunk/download-manager.php

    r2761422

    r2762092

6

6

Author: W3 Eden, Inc.

7

7

Author URI: https://www.wpdownloadmanager.com/

8

 

Version: 3.2.50

 

8

Version: 3.2.51

9

9

Text Domain: download-manager

10

10

Domain Path: /languages

…

…

 

40

40

global $WPDM;

41

41

42

 

define('WPDM\_VERSION','3.2.50');

 

42

define('WPDM\_VERSION','3.2.51');

43

43

44

44

define('WPDM\_TEXT\_DOMAIN','download-manager');
  • download-manager/trunk/readme.txt

    r2761422

    r2762092

6

6

Tested up to: 6.0

7

7

License: GPLv2 or later

8

 

Stable tag: 3.2.50

 

8

Stable tag: 3.2.51

9

9

10

10

…

…

 

182

182

\== Changelog ==

183

183

 

184

\= 3.2.51 - 2022.07.27 =

 

185

\* Revalidated attached file to avoid any blocked file type attachment

 

186

184

187

\= 3.2.50 - 2022.07.26 =

185

188

\* Added option to allow/disallow proxy IP, disallowed by default
  • download-manager/trunk/src/Admin/Menu/Packages.php

    r2761422

    r2762092

30

30

        add\_action('wp\_ajax\_wpdm\_admin\_upload\_file', array($this, 'uploadFile'));

31

31

        add\_action('save\_post', array($this, 'savePackage'));

32

 

        add\_action('before\_delete\_post', array($this, 'deleteFiles'), 10, 2);

33

32

34

33

        add\_action('manage\_wpdmpro\_posts\_columns', array($this, 'columnsTH'));

…

…

 

71

70

                foreach ($meta\_value as &$value){

72

71

                    $value = wpdm\_escs($value);

 

72

                    if(WPDM()->fileSystem->isBlocked($value)) $value = '';

73

73

                }

74

74

            } else if($meta\_key == 'terms\_conditions'){

…

…

 

89

89

        do\_action('wpdm\_admin\_update\_package',$post, $\_POST\['file'\]);

90

90

    }

91

 

92

 

    function deleteFiles($post\_id, $post)

93

 

    {

94

 

        $files = WPDM()->package->getFiles($post\_id, false);

95

 

        foreach ($files as $file) {

96

 

            $file = WPDM()->fileSystem->locateFile($file);

97

 

            @unlink($file);

98

 

        }

99

 

    }

100

91

101

92

    function duplicate()
  • download-manager/trunk/src/AssetManager/AssetManager.php

    r2651434

    r2762092

332

332

    {

333

333

334

 

        \_\_::isAuthentic('\_\_wpdm\_unlink', WPDMAM\_NONCE\_KEY, WPDM\_ADMIN\_CAP, true);

 

334

        \_\_::isAuthentic('\_\_wpdm\_unlink', WPDMAM\_NONCE\_KEY, 'manage\_options', true);

335

335

336

336

        $relpath = Crypt::decrypt(wpdm\_query\_var('delete'));

Note: See TracChangeset for help on using the changeset viewer.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda