Skip to content
RCE Disclosed report Advanced CVE-2017-5929

2 vulnerabilities of arbitrary code in ████████ - CVE-2017-5929

Logback versions before 1.2.0 contain a deserialization vulnerability in the SocketServer and ServerSocketReceiver components when remote logging is enabled. An authenticated attacker on the adjacent network could exploit this to run arbitrary code by sending malicious serialized data.

ruffdraft Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 3 days
  • Fixed in 19 days
  • Disclosed after 2.0 years

Summary: GitHub repo: https://github.com/████████

QOS.ch Logback before 1.2.0 has a serialization vulnerability affecting the SocketServer and ServerSocketReceiver components.

High Severity Arbitrary Code Execution Vulnerable module: ch.qos.logback:logback-core Introduced through: com.github.dblock.waffle:[email protected] Detailed paths Introduced through: ███@█████████#a746bb4ecce1cb252a301c08be0daffa480c9747 › com.github.dblock.waffle:[email protected] › ch.qos.logback:[email protected] Introduced through: ██████@███#a746bb4ecce1cb252a301c08be0daffa480c9747 › com.github.dblock.waffle:[email protected] › ch.qos.logback:[email protected] › ch.qos.logback:[email protected]

and

High Severity Arbitrary Code Execution Vulnerable module: ch.qos.logback:logback-classic Introduced through: com.github.dblock.waffle:[email protected] Detailed paths Introduced through: ████@█████#a746bb4ecce1cb252a301c08be0daffa480c9747 › com.github.dblock.waffle:[email protected] › ch.qos.logback:[email protected]

Description: ch.qos.logback:logback-core and ch.qos.logback:logback-classic Affected versions of this package are vulnerable Arbitrary Code Execution. A configuration can be turned on to allow remote logging through interfaces that accept untrusted serialized data. Authenticated attackers on the adjacent network can exploit this vulnerability to run arbitrary code through the deserialization of custom gadget chains.

Impact

Serialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc. Deserialization of untrusted data (CWE-502), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution. Java deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a popular library (Apache Commons Collection). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products. An attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.

Step-by-step Reproduction Instructions

  1. Run known POC CVE online

Product, Version, and Configuration (If applicable)

ch.qos.logback:[email protected] ch.qos.logback:[email protected]

Suggested Mitigation/Remediation Actions

update to latest version

The original report as published on HackerOne, by ruffdraft. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the SocketServer and ServerSocketReceiver components deserialize untrusted data without sufficient validation, allowing gadget chains to execute code.

Impact

An authenticated attacker on the adjacent network could execute arbitrary code, but only if remote logging is enabled.

What the attacker needed

Remote logging enabled; attacker on adjacent network; authenticated access

The fix

Versions before 1.2.0 are affected; users should update to the latest version.

How it was found

  1. Run a known proof-of-concept for the CVE.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Logback is a logging library for Java. When set up to receive logs over the network, it can accept data that has been turned into a stream of bytes (serialized). If an attacker sends specially crafted bytes, the library may rebuild them into malicious objects that execute code. This only works if remote logging is turned on and the attacker is already on the same network.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.