#4689 closed enhancement (fixed)
Wordpress uploads.php Cross-Site Scripting Vulnerability
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.2.2 | Priority: | highest omg bbq |
Severity: | critical | Version: | 2.2.1 |
Component: | Security | Keywords: | has-patch |
Focuses: | Cc: |
Description ¶
In /upload.php the parameter style is prone to XSS Attacks when editing Temporary Uploads (they usually have a negative ID). An attack could look like this:
/upload.php?style=%22%3E{shellcode}&tab=upload&post_id=-1337
Patch:
IDs should be integers
$ID = (int) $ID;
$post_id = (int) $post_id;
*$style = preg_replace('/[A-Za-z]/', , $style);
add the line marked with the * to upload.php behind the $post_id one
Pull Requests
- Loading…
Change History (11)
#2
@
18 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from anonymous to Nazgul
- Status changed from new to assigned
Patch puts the needed attribute_escape in place and also put one around the nearby $post_id as an extra safeguard.
#3
@ Lead Developer
18 years ago
BenjaminFlesch, in the future, please submit security bugs to security@…
Note: See
TracTickets for help on using
tickets.
Confirmed on 2.2.1 and trunk.
Fix should be a putiing in a missing attribute_escape instead of the given regex (in my opinion).