Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code injection
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Dynamic evaluation vulnerabilities=== An <syntaxhighlight lang="php" inline>eval()</syntaxhighlight> injection vulnerability occurs when an attacker can control all or part of an input string that is fed into an <syntaxhighlight lang="php" inline>eval()</syntaxhighlight> [[function call]].<ref>{{cite mailing list |author=Christey |first=Steven M. |title=Dynamic Evaluation Vulnerabilities in PHP applications |mailing-list=Full Disclosure |date=3 May 2006 |url=https://seclists.org/fulldisclosure/2006/May/35 |access-date=2018-10-21 |archive-url=https://web.archive.org/web/20091113113128/https://seclists.org/fulldisclosure/2006/May/35 |archive-date=13 November 2009 |url-status=live}}</ref> <syntaxhighlight lang="php"> $myvar = 'somevalue'; $x = $_GET['arg']; eval('$myvar = ' . $x . ';'); </syntaxhighlight> The argument of "<code>[[eval]]</code>" will be processed as [[PHP]], so additional commands can be appended. For example, if "arg" is set to "<syntaxhighlight lang="php" inline>10; system('/bin/echo uh-oh')</syntaxhighlight>", additional code is run which executes a program on the server, in this case "<code>/bin/echo</code>".
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)