🎄 Join our Annual Holiday wargame and win prizes!


Usage of Dangerous Function

This vulnerability arises when an application uses methods or functions known to be unsafe—such as `eval()` in Python or JavaScript, or `system()` in C or PHP—especially with user-supplied input. These functions can execute arbitrary code or commands, and if input isn’t strictly controlled, they become a vector for injection attacks or privilege escalation.

Remediation

To mitigate this risk, avoid using dangerous functions entirely when safer alternatives exist. If their use is absolutely necessary, ensure inputs are strictly validated, use allowlists, and isolate execution contexts to limit potential damage.

Metadata

  • Severity: medium
  • Slug: usage-of-dangerous-function

CWEs

  • 749: Exposed Dangerous Method or Function

OWASP

  • A05:2021: Security Misconfiguration

Available Labs

Select a language to explore available labs for this vulnerability.

No matching labs found

Try adjusting your language filter.

Deco line
Deco line

Play AppSec WarGames

Want to skill-up in secure coding and AppSec? Try SecDim Wargames to learn how to find, hack and fix security vulnerabilities inspired by real-world incidents.

Deco line
Deco line

Got a comment?

Join our secure coding and AppSec community. A discussion board to share and discuss all aspects of secure programming, AppSec, DevSecOps, fuzzing, cloudsec, AIsec code review, and more.

Read more