Skip to content

Add insecure_eval function for evaluating user input#2

Open
IGDEXE wants to merge 1 commit into
masterfrom
IGDEXE-patch-2
Open

Add insecure_eval function for evaluating user input#2
IGDEXE wants to merge 1 commit into
masterfrom
IGDEXE-patch-2

Conversation

@IGDEXE

@IGDEXE IGDEXE commented May 30, 2026

Copy link
Copy Markdown

No description provided.

Comment thread gtl.py
print(message, file=sys.stderr)

def insecure_eval(user_input):
return eval(user_input)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsafe eval usage can lead to remote code execution - critical severity
Using eval on expressions based on user input can execute arbitrary code.

Show fix

Remediation: Consider using ast.literal_eval as an alternative. If that is not possible, replace the usage with a safer alternative that strictly parses the expected input format.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant