Security Risks
Special care must be taken when using eval with data from an untrusted source. For instance, assuming that the get_data function gets data from the Internet, this Python code is insecure:
An attacker could supply the program with the string "session.update(authenticated=True)" as data, which would update the session dictionary to set an authenticated key to be True. To remedy this, all data which will be used with eval must be escaped, or it must be run without access to potentially harmful functions.
Read more about this topic: Eval
Famous quotes containing the words security and/or risks:
“... most Southerners of my parents era were raised to feel that it wasnt respectable to be rich. We felt that all patriotic Southerners had lost everything in defense of the South, and sufficient time hadnt elapsed for respectable rebuilding of financial security in a war- impoverished region.”
—Sarah Patton Boyle, U.S. civil rights activist and author. The Desegregated Heart, part 1, ch. 1 (1962)
“In America any boy may become President, and I suppose its just one of the risks he takes!”
—Adlai Stevenson (19001965)