cbcvebase.
CVE-2019-3398
published 2019-04-18

CVE-2019-3398: Confluence Server and Data Center had a path traversal vulnerability in the downloadallattachments resource. A remote attacker who has permission to add…

PriorityP195high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
KEVITWEXPLOITInitial access
CISA Known Exploited Vulnerabilitydue 2022-05-03
Exploited in the wild
EPSS
97.15%
99.9th percentile
Confluence Server and Data Center had a path traversal vulnerability in the downloadallattachments resource. A remote attacker who has permission to add attachments to pages and / or blogs or to create a new space or a personal space or who has 'Admin' permissions for a space can exploit this path traversal vulnerability to write files to arbitrary locations which can lead to remote code execution on systems that run a vulnerable version of Confluence Server or Data Center. All versions of Confluence Server from 2.0.0 before 6.6.13 (the fixed version for 6.6.x), from 6.7.0 before 6.12.4 (the fixed version for 6.12.x), from 6.13.0 before 6.13.4 (the fixed version for 6.13.x), from 6.14.0 before 6.14.3 (the fixed version for 6.14.x), and from 6.15.0 before 6.15.2 are affected by this vulnerability.

Affected

15 ranges
VendorProductVersion rangeFixed in
atlassianconfluence>= 2.0.0 < unspecifiedunspecified
atlassianconfluence>= 6.13.0 < unspecifiedunspecified
atlassianconfluence>= 6.14.0 < unspecifiedunspecified
atlassianconfluence>= 6.15.0 < unspecifiedunspecified
atlassianconfluence>= 6.7.0 < unspecifiedunspecified
atlassianconfluence>= unspecified < 6.6.136.6.13
atlassianconfluence>= unspecified < 6.12.46.12.4
atlassianconfluence>= unspecified < 6.13.46.13.4
atlassianconfluence>= unspecified < 6.14.36.14.3
atlassianconfluence>= unspecified < 6.15.26.15.2
atlassianconfluence_server>= 2.0 < 6.6.136.6.13
atlassianconfluence_server>= 6.13.0 < 6.13.46.13.4
atlassianconfluence_server>= 6.14.0 < 6.14.36.14.3
atlassianconfluence_server>= 6.15.0 < 6.15.26.15.2
atlassianconfluence_server>= 6.7.0 < 6.12.46.12.4

Detection & IOCsextracted from sources · hover to see the quote

url/dologin.action
url/plugins/drag-and-drop/upload.action
url/pages/downloadallattachments.action
url/pages/assist.jsp
path../../../../../../../../../../<ROOTFOLDER><FILENAME>
path../../../../../../opt/atlassian/confluence/confluence/pages/<randstr>.jsp
filenamecovfefe.jsp
port8090
pathProgram Files/Atlassian/Confluence/confluence/pages/
pathopt/atlassian/confluence/confluence/pages/
snort
alert http any any -> [$HOME_NET,$HTTP_SERVERS] 8090 (msg:"ET EXPLOIT Confluence Server Path Traversal Vulnerability (CVE-2019-3398)"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"plugins/drag-and-drop/upload.action"; nocase; fast_pattern; content:"draftId="; nocase; distance:0; content:"filename="; nocase; content:"/shell.jsp"; nocase; content:"atl_token"; nocase; http.request_body; content:"<%"; reference:url,github.com/superevr/cve-2019-3398/blob/master/poc.py; reference:cve,2019-3398; classtype:attempted-admin; sid:2034261; rev:1; metadata:created_at 2021_10_27, cve CVE_2019_3398, deployment Perimeter, deployment Internal, confidence High, signature_severity Major, tag CISA_KEV, tag Description_Generated_By_Proofpoint_Nexus, updated_at 2021_10_27, mitre_tactic_id TA0007, mitre_tactic_name Discovery, mitre_technique_id T1083, mitre_technique_name File_And_Directory_Discovery; target:dest_ip;)
  • Detect exploit attempts by monitoring POST requests to /plugins/drag-and-drop/upload.action containing path traversal sequences (e.g., '../../') in the 'filename' query parameter, combined with a JSP file extension in the filename value.
  • Monitor GET requests to /pages/downloadallattachments.action immediately following a suspicious upload, as the exploit triggers this endpoint to move the uploaded webshell to the web root.
  • Alert on HTTP responses with code 200 to newly created .jsp files under /pages/ that were not previously present, indicating successful webshell placement.
  • The exploit authenticates using /dologin.action and then retrieves an XSRF/ATLASSIAN token from the meta tag 'atlassian-token'; monitor for automated login sequences followed immediately by upload and downloadall requests.
  • The Emerging Threats Snort rule (sid:2034261) fires on POST to plugins/drag-and-drop/upload.action with draftId=, filename=, /shell.jsp, atl_token, and JSP scriptlet marker '<%%' in the body on port 8090.
  • Look for the User-Agent string 'python-requests/2.20.0' in requests to Confluence REST API endpoints (/rest/api/space) and upload endpoints, as this is hardcoded in both the standalone and Metasploit exploit modules.
  • The XSRF token is extracted from the HTML meta tag with id 'atlassian-token'; automated scraping of this token followed by upload requests is a strong indicator of exploit activity.
  • The Nuclei template confirms exploitation by checking the HTTP response body of the dropped JSP for a computed arithmetic result (num1*num2), which can be used as a detection canary.
  • ·On Linux, Confluence runs under the 'confluence' account which may not have rights to write files to the web root; exploitation may fail in hardened Linux deployments.
  • ·On Windows, the web root and the Confluence temporary directory must reside on the same drive for the path traversal write to succeed.
  • ·The REST API used to enumerate and create spaces (required for PAGEID=0 fallback) is only available from Confluence Server 5.5 onwards; older instances may not support this exploit path.
  • ·The attacker must have at least permission to add attachments to pages/blogs, create a new/personal space, or hold 'Admin' permissions for a space; unauthenticated exploitation is not possible.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.09.0CRITICALAV:N/AC:L/Au:S/C:C/I:C/A:C
vulncheck8.8HIGH
cisa8.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.