Ticket #10692 (closed defect (bug): fixed)

Opened 2 years ago

Last modified 2 years ago

Do not allow unfiltered uploads for admins by default

Reported by: ryan Owned by: ryan
Priority: normal Milestone: 2.8.5
Component: Security Version:
Severity: normal Keywords: upload
Cc:

Description

When someone compromises an admin account, often one of the first things they do is upload some .php files. This is allowed because admin users have the unfiltered_upload capability. Perhaps this should be disallowed by default, with a wp-config define enabling it again. With this disallowed and all write permissions on files locked down, adding arbitrary code is much harder even when an admin account is compromised.

Attachments

10692.diff Download (529 bytes) - added by ryan 2 years ago.

Change History

ryan2 years ago

+100

All users should be limited by the whitelist and admins should add filetypes to that with knowledge.

 http://wordpress.org/extend/plugins/pjw-mime-config/

comment:2   ryan2 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [11887]) Disallow unfiltered uploads for admins by default. fixes #10692

comment:3   ryan2 years ago

(In [11888]) Disallow unfiltered uploads for admins by default. fixes #10692 for 2.8

comment:4   ryan2 years ago

  • Milestone changed from 2.9 to 2.8.5

comment:5   dd322 years ago

Whats the point of the do_not_allow capability?

  • Status changed from closed to reopened
  • Resolution fixed deleted

Are you not missing a break in the case statement in the 2.8 patch ?

comment:7   ryan2 years ago

It happens to work without the break since an imaginary cap is inserted, but the break should be there. Well-spotted.

comment:8   ryan2 years ago

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [11912]) Add missing break. Props snakefoot. fixes #10692

You are welcome :), I'm maintaining a Wordpress 2.0 installation while waiting for a blocking issue will be resolved. I monitor the code changes related to security issues to see if they are relevant for Wordpress 2.0.

Note: See TracTickets for help on using tickets.