Detecting SAP Portal JNDI injection CVE-2025-42884: 5 Sigma rules from request to shell

Detecting SAP Portal JNDI injection CVE-2025-42884: 5 Sigma rules from request to shell

CISA put CVE-2025-42884 in its Known Exploited Vulnerabilities catalog on November 20, 2026 and gave agencies until November 23. What it didn’t give anyone is something to search for. No IOCs, no request samples, no attacker infrastructure, no vulnerable parameter name. SAP’s note is behind a login, and I found no detection guidance from the researchers credited with the bug, though I couldn’t open their advisory. If you run SAP NetWeaver Enterprise Portal 7.50 and want to know whether somebody already used this on you, you’re hunting blind.

Not completely blind, though. JNDI injection is a well-understood bug class, and it has to touch a few things you can log. The background (what the bug is, why a 6.5 deserves RCE-class priority, what to patch) is in my analysis of the bug. This post is the detection side: five experimental Sigma rules, the telemetry they need, honest false-positive notes and the gaps none of them close.

At a glance

  • Rules: 5 (two high, three medium), all hunting heuristics built from the bug class, none from observed attacks
  • Domains: Web/App (two rules), Linux (two rules), Windows (one rule)
  • Log sources: reverse proxy or portal HTTP access logs with full query strings; host network connection events with process image (Sysmon event 3, Sysmon for Linux or EDR); Linux process creation with parent image
  • ATT&CK: T1190 Exploit Public-Facing Application; T1059.004 Unix Shell and T1105 Ingress Tool Transfer for the post-exploitation rule
  • Status: all experimental
  • YAML: Detection Rules repo on GitHub (Web-App, Linux and Windows folders)

The case in brief

The CVE record says an unauthenticated attacker can inject JNDI environment properties, or pass a URL that the portal uses during a JNDI lookup, and so reach “an unintended JNDI provider”. SAP scores the result as limited disclosure or modification of server information. Onapsis, which found the bug, claims more: according to Rescana’s summary of the Onapsis advisory, the lookup can be pointed at an attacker-run RMI registry and, with a usable gadget chain and no deserialization filter, end in code execution. I couldn’t verify that claim, and CISA says nothing about what the observed exploitation achieved. The analysis has the details.

That gives three moments to catch: the request (if the properties or URL travel in the query string), the callback from the portal’s Java server to the attacker’s provider, and, only if the RCE claim holds, a shell or download tool started by the Java process. Everything specific here (match strings, ports, process names) is my inference from the bug class. The one piece I could anchor in a source is the process name: WithSecure’s write-up of the 2025 NetWeaver attacks shows the SAP Java launcher as jstart.EXE under \usr\sap\<SID>\J00\exe\ on Windows. That the server process image is also jstart on Linux is my assumption; check it with ps on your own hosts before you rely on rules 3 and 5.

Detection map

Detection map: proxy and portal access logs, host network events and Linux process creation feed five Sigma rules (JNDI property in request, provider URL in request, Java server outbound LDAP or RMI on Linux and Windows, shell from Java server) mapped to T1190 and T1059.004/T1105, with POST bodies, odd ports and in-memory payloads marked as gaps.
Which telemetry feeds which rule, and what stays dark. All five rules are experimental hunting heuristics; no IOCs have been published.

Left to right: access logs feed the two request rules, host network events feed the Linux and Windows callback rules, and Linux process creation feeds the shell rule. The callback rules are the ones I trust most in principle, because a JNDI injection that works has to connect somewhere, however the request was encoded. The dashed box is what stays dark: injection in POST bodies or headers, callbacks on non-standard ports or over DNS, and any payload that never starts a process.

Rule overview

RuleDomainLog sourceATT&CK (tactic / technique)LevelStatus
JNDI environment property in SAP portal requestWeb/AppwebserverInitial Access / T1190HighExperimental
JNDI provider URL scheme in SAP portal requestWeb/AppwebserverInitial Access / T1190MediumExperimental
SAP Java server outbound LDAP or RMI to public IP (Linux)Linuxlinux / network_connectionInitial Access / T1190MediumExperimental
SAP Java server outbound LDAP or RMI to public IP (Windows)Windowswindows / network_connectionInitial Access / T1190MediumExperimental
Shell or download tool spawned by SAP Java server (Linux)Linuxlinux / process_creationExecution / T1059.004, Command and Control / T1105HighExperimental

The rules

JNDI environment property in SAP portal request

Context: the CVE text names “JNDI environment properties” as one of the two injection paths. In Java those properties have fixed, documented names that all start with java.naming.: the provider URL, the initial context factory, the object and URL factory packages, the security principal. If an attacker sends them in a GET request, the name has to appear in the query string.

Condition: alert when the request URI or query string contains java.naming., or its URL-encoded form java%2enaming. Sigma’s contains is case-insensitive, so %2E matches too. I put the stem in a second selection because some parsers keep the whole URI in one field.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: Potential CVE-2025-42884 Exploitation - JNDI Environment Property in SAP Portal Request
id: 06184bae-fd4a-4a75-896c-0af780ed4e0b
status: experimental
description: |
    Hunting heuristic for CVE-2025-42884: detects HTTP requests whose URI or query string carries a standard
    JNDI environment property name (java.naming.*), plain or URL-encoded. The CVE describes unauthenticated
    injection of JNDI environment properties into SAP NetWeaver Enterprise Portal. No IOCs or request samples
    are public, so the match strings are inferred from the bug class, not from observed attacks.
references:
    - https://cveawg.mitre.org/api/cve/CVE-2025-42884
    - https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-42884
    - https://support.sap.com/en/my-support/knowledge-base/security-notes-news/bulletin-2025.html
    - https://netsec101.com/?p=429
author: netsec101.com
date: 2026-11-22
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2025-42884
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection_query:
        cs-uri-query|contains:
            - 'java.naming.'
            - 'java%2enaming'
    selection_stem:
        cs-uri-stem|contains:
            - 'java.naming.'
            - 'java%2enaming'
    condition: 1 of selection_*
falsepositives:
    - Vulnerability scanners and authorised penetration tests probing for JNDI injection
    - Administrators testing JNDI or UME settings through the portal from an internal admin workstation (scope the rule to external or reverse-proxy traffic)
level: high

View on GitHub

False positives and tuning: I expect very few from outside. Scanners that probe for JNDI injection will hit it, and an administrator testing JNDI or UME settings through the portal might. Scope the rule to logs from your reverse proxy or to requests from outside your admin networks, and it should stay quiet enough for high. The blind spot is the request body: if the vulnerable endpoint takes these properties in a POST, access logs won’t show them, and you need WAF or reverse proxy body logging to see them.

How to test: send a harmless GET to a lab web server whose logs you ship, with ?test=java.naming.provider.url in the query, and confirm the alert. No exploit involved; the log line is the test.

JNDI provider URL scheme in SAP portal request

Context: the other injection path in the CVE is a URL used during the lookup. JNDI providers that matter for this bug class take ldap://, ldaps://, rmi://, iiop:// or dns:// URLs. Unlike Log4Shell, there is no ${jndi: wrapper here, so SigmaHQ’s Log4j rules, which match on the wrapper, won’t catch a bare provider URL. I borrowed the scheme list from SigmaHQ’s “Log4j RCE CVE-2021-44228 Generic” rule by Florian Roth; the logic is my own.

Condition: alert when the URI or query string matches one of those schemes followed by ://, with the colon and slashes plain, URL-encoded or double-encoded. The regex is case-insensitive. It does not match ordinary links such as http://ldap.example.com/.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: Potential CVE-2025-42884 Exploitation - JNDI Provider URL Scheme in SAP Portal Request
id: debb5055-ec28-4b73-bf08-4d7c766bba3d
status: experimental
description: |
    Hunting heuristic for CVE-2025-42884: detects HTTP requests whose URI or query string contains a
    JNDI-capable provider URL (ldap, ldaps, rmi, iiop, dns), plain, URL-encoded or double-encoded. The CVE
    says an attacker can pass a URL used during a JNDI lookup. No IOCs are public; the logic is inferred
    from the bug class and will also fire on Log4Shell-style spraying.
references:
    - https://cveawg.mitre.org/api/cve/CVE-2025-42884
    - https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-42884
    - https://netsec101.com/?p=429
author: netsec101.com
date: 2026-11-22
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2025-42884
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection_query:
        cs-uri-query|re|i: '(ldaps?|rmi|iiop|dns)(:|%3a|%253a)(/|%2f|%252f){2}'
    selection_stem:
        cs-uri-stem|re|i: '(ldaps?|rmi|iiop|dns)(:|%3a|%253a)(/|%2f|%252f){2}'
    condition: 1 of selection_*
falsepositives:
    - Internet-wide Log4Shell and JNDI scanners (expected background noise on any exposed web server; triage by response code and by outbound connections from the portal host)
    - Portal or UME administration pages that take an LDAP server URL as a parameter (usually POST bodies, which access logs do not record)
    - Redirect or deep-link parameters that legitimately embed an ldap:// URL (rare; allowlist by cs-uri-stem)
level: medium

View on GitHub

False positives and tuning: this is the noisy one. Any internet-facing web server still gets Log4Shell-style spraying, and much of it carries ldap:// URLs. Don’t page on every hit. Group by source IP and check whether the portal host connected out to the host named in the URL shortly afterwards: that correlation turns a scanner hit into an incident. Admin pages that take an LDAP URL usually send it in a POST body, which access logs don’t record. If the volume is high, drop the level to low and use it for hunting.

How to test: request ?ref=ldap%3A%2F%2Ftest.invalid%2Fx against a lab web server. The .invalid top-level domain never resolves, so nothing leaves your network.

SAP Java server outbound LDAP or RMI to public IP (Linux)

Context: a successful JNDI injection makes the server talk to a provider the attacker chose. For the RCE path Onapsis describes, that’s an RMI registry; for classic JNDI tricks, an LDAP server. Either way the connection starts from the SAP Java server process, and a portal has little reason to talk LDAP or RMI to the internet. This rule sees the callback regardless of how the request was encoded or whether it came in a body.

Condition: alert when jstart (or a java binary under /usr/sap/) opens a connection to a non-private IP on port 389 (LDAP), 636 (LDAPS), 3268 or 3269 (Active Directory global catalog) or 1099 (the default RMI registry port).

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application. The callback is part of the exploit, so I map it there rather than inventing a C2 technique for it.

title: SAP NetWeaver Java Server Outbound LDAP or RMI Connection to Public IP - Linux
id: 7fd81d3d-f4d9-4b13-85b8-61f056e16923
status: experimental
description: |
    Hunting heuristic: detects the SAP NetWeaver AS Java server process (jstart, or a java binary under
    /usr/sap/) opening an outbound connection to a non-private address on an LDAP, LDAPS, global catalog or
    RMI registry port. A JNDI injection such as CVE-2025-42884 makes the server contact an attacker-chosen
    provider; this is that callback. Process names and ports are inferred, not from observed attacks.
references:
    - https://cveawg.mitre.org/api/cve/CVE-2025-42884
    - https://labs.withsecure.com/publications/netweaver-cve-2025-31324
    - https://netsec101.com/?p=429
author: netsec101.com
date: 2026-11-22
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2025-42884
logsource:
    product: linux
    category: network_connection
detection:
    selection_img_jstart:
        Image|endswith: '/jstart'
    selection_img_java:
        Image|contains: '/usr/sap/'
        Image|endswith: '/java'
    selection_port:
        DestinationPort:
            - 389
            - 636
            - 1099
            - 3268
            - 3269
    filter_main_private:
        DestinationIp|cidr:
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '127.0.0.0/8'
            - '169.254.0.0/16'
            - '100.64.0.0/10'
            - '::1/128'
            - 'fc00::/7'
            - 'fe80::/10'
    condition: 1 of selection_img_* and selection_port and not filter_main_private
falsepositives:
    - Portals configured against a directory hosted on public address space (cloud LDAP or a partner directory); add those destinations to a filter
    - Organisations that use public IP ranges internally; replace the private-range filter with your own internal ranges
level: medium

View on GitHub

False positives and tuning: the main one is a portal that really does use a directory on public address space, such as a cloud LDAP service or a partner directory. Add those destinations as a filter. If your company uses public IP ranges internally, replace the private-range filter with your own ranges. Attackers can use any high port, so also run a version without the port selection as a weekly hunt and stack the destinations. Without host telemetry, use firewall logs: outbound flows from portal IPs to non-allowlisted destinations.

How to test: you can’t safely make the SAP server do a JNDI lookup on demand, so replay a network connection event into a test index instead. Set the image to your real jstart path, destination port 389 and a documentation address such as 203.0.113.10.

SAP Java server outbound LDAP or RMI to public IP (Windows)

Context: the same callback idea for portals on Windows, which is where WithSecure saw jstart.EXE in the 2025 NetWeaver investigations. It needs Sysmon event 3 or an EDR that records the initiating process.

Condition: alert when jstart.exe (or java.exe under \usr\sap\) initiates a connection to a non-private IP on 389, 636, 3268, 3269 or 1099.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: SAP NetWeaver Java Server Outbound LDAP or RMI Connection to Public IP - Windows
id: f7521fb5-300b-4416-97d4-6fec90c317f9
status: experimental
description: |
    Hunting heuristic: detects the SAP NetWeaver AS Java server process (jstart.exe, or java.exe under
    \usr\sap\) initiating a connection to a non-private address on an LDAP, LDAPS, global catalog or RMI
    registry port. A JNDI injection such as CVE-2025-42884 makes the server contact an attacker-chosen
    provider; this is that callback. Process names and ports are inferred, not from observed attacks.
references:
    - https://cveawg.mitre.org/api/cve/CVE-2025-42884
    - https://labs.withsecure.com/publications/netweaver-cve-2025-31324
    - https://netsec101.com/?p=429
author: netsec101.com
date: 2026-11-22
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2025-42884
logsource:
    product: windows
    category: network_connection
detection:
    selection_img_jstart:
        Image|endswith: '\jstart.exe'
    selection_img_java:
        Image|contains: '\usr\sap\'
        Image|endswith: '\java.exe'
    selection_net:
        Initiated: 'true'
        DestinationPort:
            - 389
            - 636
            - 1099
            - 3268
            - 3269
    filter_main_private:
        DestinationIp|cidr:
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '127.0.0.0/8'
            - '169.254.0.0/16'
            - '100.64.0.0/10'
            - '::1/128'
            - 'fc00::/7'
            - 'fe80::/10'
    condition: 1 of selection_img_* and selection_net and not filter_main_private
falsepositives:
    - Portals configured against a directory hosted on public address space (cloud LDAP or a partner directory); add those destinations to a filter
    - Organisations that use public IP ranges internally; replace the private-range filter with your own internal ranges
level: medium

View on GitHub

False positives and tuning: same as the Linux version. Many Windows-hosted portals authenticate against Active Directory over 389 or 3268, but to internal addresses, which the private-range filter removes. If your domain controllers sit on public ranges, filter them by address. Some Sysmon configs drop network events for noisy processes, so check that yours doesn’t exclude jstart.exe.

How to test: replay a Sysmon event 3 with the image set to your jstart.exe path, Initiated true, destination port 1099 and destination 203.0.113.10.

Shell or download tool spawned by SAP Java server (Linux)

Context: this rule only matters if the RCE claim holds. If it does, whatever the attacker runs starts inside the Java server, and the first visible step is usually a shell, an interpreter or a download tool. SigmaHQ already has “Suspicious Child Process of SAP NetWeaver – Linux” (from Elastic’s idea, written for the 2025 Visual Composer attacks), but it keys on the IRJ web application directories, which suits web shells. A JNDI or deserialization payload runs in the server process itself, so I key on the parent image instead. Elastic’s “Suspicious Java Child Process” follows the same idea for any Java parent.

Condition: alert when jstart (or a java binary under /usr/sap/) starts sh, bash, dash, ksh, zsh, busybox, python, perl, curl, wget, nc, ncat or socat.

ATT&CK: Execution (TA0002) – T1059.004 Unix Shell; Command and Control (TA0011) – T1105 Ingress Tool Transfer.

title: Shell or Download Tool Spawned by SAP NetWeaver Java Server Process - Linux
id: 6b5f1a48-c9b3-4966-980f-beed8b0a5a7e
status: experimental
description: |
    Detects the SAP NetWeaver AS Java server process (jstart, or a java binary under /usr/sap/) starting a
    shell, scripting interpreter or network/download tool. If a JNDI injection such as CVE-2025-42884 is
    chained into code execution (an Onapsis claim, unconfirmed), the payload runs as a child of the Java
    server. Complements the SigmaHQ CVE-2025-31324 rule, which keys on IRJ web-application paths instead.
references:
    - https://cveawg.mitre.org/api/cve/CVE-2025-42884
    - https://www.rescana.com/post/sap-netweaver-enterprise-portal-cve-2025-42884-jndi-injection-kev-patch-now
    - https://detection.fyi/sigmahq/sigma/emerging-threats/2025/exploits/cve-2025-31324/proc_creation_lnx_sap_netweaver_susp_child_process/
    - https://netsec101.com/?p=429
author: netsec101.com
date: 2026-11-22
tags:
    - attack.execution
    - attack.t1059.004
    - attack.command-and-control
    - attack.t1105
    - cve.2025-42884
logsource:
    product: linux
    category: process_creation
detection:
    selection_parent_jstart:
        ParentImage|endswith: '/jstart'
    selection_parent_java:
        ParentImage|contains: '/usr/sap/'
        ParentImage|endswith: '/java'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/ksh'
            - '/zsh'
            - '/busybox'
            - '/python'
            - '/python3'
            - '/perl'
            - '/curl'
            - '/wget'
            - '/nc'
            - '/ncat'
            - '/socat'
    condition: 1 of selection_parent_* and selection_child
falsepositives:
    - SAP-delivered or custom jobs that run OS commands from the Java stack (for example scripts started through NetWeaver Administrator or a scheduler); baseline the CommandLine values for two weeks and filter them by exact match
    - Support engineers running OS diagnostics through SAP tooling
level: high

View on GitHub

False positives and tuning: some SAP shops run OS commands from the Java stack on purpose, through NetWeaver Administrator, a job scheduler or custom code. Run the rule silently for two weeks, list the command lines it catches and filter the legitimate ones by exact match, not by a broad contains an attacker could imitate. If the baseline is clean, keep it at high.

How to test: on a lab Linux host with Sysmon for Linux or EDR, copy /bin/bash to /tmp/test/jstart and run /tmp/test/jstart -c '/bin/sh -c id; true'. The trailing ; true stops bash from replacing itself, so /bin/sh becomes a real child of a process whose image ends in /jstart. Not on a production SAP host.

Coverage and gaps

Step in caseTacticTechniqueRuleCovered?
JNDI properties in requestInitial Access (TA0001)T1190JNDI environment property ruleYes, query string only
Provider URL in requestInitial Access (TA0001)T1190Provider URL scheme ruleYes, query string only
Injection in POST body or headersInitial Access (TA0001)T1190NoneGap: access logs don’t record bodies
Callback to attacker LDAP or RMIInitial Access (TA0001)T1190Linux and Windows callback rulesYes on standard ports; gap for high ports, IIOP, DNS
Information read or changedCollection / ImpactUnknownNoneGap: no telemetry for what the lookup returned
Possible RCE, shell or download on LinuxExecution (TA0002), C2 (TA0011)T1059.004, T1105Java server child process ruleYes
Possible RCE on a Windows hostExecution (TA0002)T1059.001 / T1059.003None of minePartly: SigmaHQ’s CVE-2025-31324 Windows rule covers IRJ paths only
In-memory payload, no new processExecution / PersistenceUnknownNoneGap: needs JVM-level or EDR memory telemetry

The biggest hole is that nobody has said which endpoint or parameter is vulnerable, or whether the payload goes in a GET or a POST. If it’s a POST, both web rules are blind and the callback rules carry the load. The second hole is the payload that never forks: code running in a JVM can do a lot without a shell. What would help: body logging at the reverse proxy or WAF for portal paths, deny-by-default egress on SAP Java hosts (every blocked callback becomes a firewall log line), and the NetWeaver default trace in your SIEM so naming exceptions from portal requests are searchable, a check SentinelOne’s entry also suggests. A published request sample would allow a proper Suricata signature.

For a quick retro-hunt before you deploy anything, the same strings work with grep over raw access logs:

grep -Eai "(ldaps?|rmi|iiop|dns)(:|%3a|%253a)(/|%2f|%252f){2}|java(\.|%2e)naming" \
  /path/to/reverse-proxy/access*.log /path/to/httpaccess/*.log

Deploying the rules

Grab the YAML from the GitHub repo and convert it with sigma-cli after installing the backend plugin for your SIEM. Pick a pipeline that matches each rule’s log source: the Windows rule works with the standard Windows pipelines, while the web and Linux rules need your own field mappings for cs-uri-query, cs-uri-stem, Image, ParentImage and DestinationIp. A few examples (I haven’t run these here; check the target and pipeline names against the sigma-cli plugins you have installed):

sigma convert -t splunk -p splunk_windows net_connection_win_sap_java_outbound_ldap_rmi_public.yml
sigma convert -t lucene -p ecs_windows net_connection_win_sap_java_outbound_ldap_rmi_public.yml
sigma convert -t kusto -p microsoft_xdr net_connection_win_sap_java_outbound_ldap_rmi_public.yml
sigma convert -t splunk --without-pipeline web_cve_2025_42884_sap_portal_jndi_property_in_request.yml

Check two things in the converted queries. The |re|i regex in the URL scheme rule needs a backend that supports case-insensitive regex; if yours doesn’t, lower-case the field first or expand the pattern. And the |cidr filters need the destination IP field mapped as an IP type, otherwise some backends silently match nothing. Run all five in alert-only mode for a week before anything pages a human.

My take

This bug is hard to detect well from the request side. Without a known endpoint or request sample, the web rules are educated guesses that catch lazy GET-based exploitation and plenty of scanner noise. The callback is where I’d put my effort. A portal server connecting to an unknown LDAP or RMI server on the internet is suspicious for this CVE, for the next JNDI bug and for Log4Shell-style payloads hitting any Java component on that box. If I could turn on only one rule, it would be the callback rule for whichever OS your portals run on, paired with an egress deny policy so the attack fails even when the alert is missed.

What I’d like from SAP is a log line. The fix validates request parameters; logging the rejected ones, with the parameter name, would give every customer a high-fidelity signal for free. Until then, if your portal was on the internet and unpatched at any point since November 11, 2025, the absence of alerts from these rules is weak evidence, and I’d treat it that way.

Sources

One thought on “Detecting SAP Portal JNDI injection CVE-2025-42884: 5 Sigma rules from request to shell”

Leave a Reply