We tracked the following data from "input" Parameter:
GET /servlet-2.5/log-string?input=value
...which was accessed within the following code:
com.contrastsecurity.testapp.servlet25.log.LogStringServlet#doGet(), line 31
...and ended up in this log message:
value
What's the risk?
The application takes data from the user and writes it to a log file without validation or encoding. Technically, a user could provide newline characters and spoof new log entries. It's unlikely that this could cause real harm to any of the application stakeholders, but some regulations require log file integrity to be controlled.
Recommendation
Sanitize or validate all input that is going to be logged. Make sure users can't provide newline characters that get into log messages.
Vulnerability ID: YIU7-J5DV-7U76-TDFE
Application Name: AgentMessageGeneratorJava
Vulnerability Link: http://localhost:19080/Contrast/static/ng/index.html#/7c6cfec5-a187-4d5e-984a-d11d96d2ef63/applications/6394f24f-037b-43bb-8ac2-05fa5fb5d862/vulns/YIU7-J5DV-7U76-TDFE
What Happened?
We tracked the following data from "input" Parameter:
GET /servlet-2.5/log-string?input=value
...which was accessed within the following code:
com.contrastsecurity.testapp.servlet25.log.LogStringServlet#doGet(), line 31
...and ended up in this log message:
value
What's the risk?
The application takes data from the user and writes it to a log file without validation or encoding. Technically, a user could provide newline characters and spoof new log entries. It's unlikely that this could cause real harm to any of the application stakeholders, but some regulations require log file integrity to be controlled.
Recommendation
Sanitize or validate all input that is going to be logged. Make sure users can't provide newline characters that get into log messages.
First Event
Last Event
HTTP Request
GET http://localhost:32814/servlet-2.5/log-string?input=value HTTP/1.0 Connection: Keep-Alive Host: localhost:32814 Contrast-Mq-Name: queue-039-HttpServlet25ForwardCompatibleMixin.it_tests_servlet_log_sinks-contrastsecurity-docker.jfrog.io/contrast/jboss-servlet-2.5:5.1.0.CR1-rev1 User-Agent: okhttp/3.9.1 Accept-Encoding: gzip