Opened 16 years ago
Closed 15 years ago
#10729 closed defect (bug) (fixed)
Potential code injection risk.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | Security | Keywords: | |
Focuses: | Cc: |
Description
eval-compareable code injection possible with this code signature:
add_action('admin_notices', create_function( , "echo '$message';" ) );
found in wp-admin/post.php on line ~150.
inject squence "\'; PAYLOAD-PHP-CODE " as $message, done.
code will be executed when admin_notices is fired.
Attachments (2)
Change History (17)
#2
@
16 years ago
and an easy to fix one. I had an idea while getting awake this morning. I will create a patch now.
#3
@
16 years ago
- Milestone changed from Unassigned to 2.9
I added the patch. Code Execution is prevented now because it is not executed any longer but handeled as html-string-data instead (and that's what it is).
I will further analyze the code if there are similar scenarios elsewhere.
I patched against trunk, someone need to open a backport ticket for 2.8.5.
#4
@
16 years ago
I was able to find other places where similar potential code-injections are possible. Most of them are fixed with the last patch, two of them are are marked with FIXME todo tags because I was not able to fix them right now and/or to verify wether or not those are actually dangerous. The function with the two FIXME tags in it is the most potential one so far as I can say.
#7
@
16 years ago
Trying to switch as many of these as possible just away from using create_function at all.
#10
@
16 years ago
+1 for: "switch as many of these as possible away from using create_function at all"
Full code is:
so the problem would only occur when the malicious code is in a user's display name.
Nonetheless a very dangerous vulnerability.