{"exploit":{"id":"EDB-49232","name":"Jenkins 2.235.3 - 'tooltip' Stored Cross-Site Scripting (XSS)","description":"Jenkins 2.235.3 - 'tooltip' Stored Cross-Site Scripting (XSS)","cves":["CVE-2020-2229"],"author":"gx1","published":"2020-12-11","platform":"java","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/49232","path":"exploits/java/webapps/49232.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-49232.txt","vulnerabilities":[{"id":"CVE-2020-2229","state":"PUBLISHED","title":null,"titleSource":null,"description":"Jenkins 2.251 and earlier, LTS 2.235.3 and earlier does not escape the tooltip content of help icons, resulting in a stored cross-site scripting (XSS) vulnerability.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2020-2229","cvss":{"version":"3.1","baseScore":5.4,"severity":"medium","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2020-2229"},"updatedAt":"2024-08-04T07:01:41.164Z","retrievedAt":"2026-11-26T14:07:30.958Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-49232.png?v=2","url":"https://exploitbin.com/exploits/EDB-49232","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-49232/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-49232/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Jenkins 2.235.3 - 'tooltip' Stored Cross-Site Scripting\n# Date: 11/12/2020\n# Exploit Author: gx1\n# Vendor Homepage: https://www.jenkins.io/\n# Software Link:  https://updates.jenkins-ci.org/download/war/\n# Version: <= 2.251 and <= LTS 2.235.3\n# Tested on: any\n# CVE :  CVE-2020-2229\n\n# References:\nhttps://www.jenkins.io/security/advisory/2020-08-12/#SECURITY-1955\nhttps://www.openwall.com/lists/oss-security/2020/08/12/4\n\nVendor Description:\n\nJenkins 2.251 and earlier, LTS 2.235.3 and earlier does not escape the tooltip content of help icons.\nTooltip values can be contributed by plugins, some of which use user-specified values.\nThis results in a stored cross-site scripting (XSS) vulnerability.\nJenkins 2.252, LTS 2.235.4 escapes the tooltip content of help icons.\n\nTechnical Details and Exploitation:\n\nAs it is possible to observe from patch commit:\nhttps://github.com/jenkinsci/jenkins/pull/4918/commits/c991b45b5bae09f9894acdc1f1fb1d8809fe6ef6\nThe fix to solve the vulnerability is applied to 'core/src/main/resources/lib/layout/svgIcon.jelly' tooltip attribute:\n\n    <svg class=\"svg-icon ${attrs.class}\"\n         viewBox=\"${attrs.viewBox != null ? attrs.viewBox : '0 0 24 24'}\"\n         focusable=\"${attrs.focusable != null ? attrs.focusable : 'false'}\"\n         aria-hidden=\"${attrs.ariaHidden != null ? attrs.ariaHidden : ''}\"\n         style=\"${attrs.style}\"\n         onclick=\"${attrs.onclick}\"\n         tooltip=\"${h.xmlEscape(attrs.tooltip ?: '')}\">\n\nsvgIcon is a layout element belonging to jenkins core:  https://reports.jenkins.io/core-taglib/jelly-taglib-ref.html#layout:svgIcon\nAs suggested by Jenkins documentation (https://www.jenkins.io/doc/developer/security/xss-prevention/)\n\"Note that this only affects the use of ${...} among PCDATA, and not in attribute values, so that Jelly tag invocations don’t result in surprising behavior.\"\nTooltip attribute can contain HTML code, as suggested in form section: https://www.jenkins.io/doc/developer/forms/adding-tool-tips/\nFor this reason, it is possible to inject XSS code in a Jenkins system by uploading a plugin that contains an <j:svgIcon> element containing a malicious XSS payload in tooltip attribute:\n\n<l:svgIcon tooltip=\"<img src=a onerror=alert(1)>\">...</l:svgIcon>\n\nTo build a Jenkins plugin, visit https://www.jenkins.io/doc/developer/tutorial/create/  .\nTo obtain information about Jelly syntax, visit  https://wiki.jenkins.io/display/JENKINS/Basic+guide+to+Jelly+usage+in+Jenkins\n\nProof Of Concept:\n\n1. Obtain access to upload Jenkins plugins, or find plugins that can insert svgIcon element.\n2. Generate a plugin. For example, you can create a class that implements ModelObjectWithContextMenu interface to create a context menu and implement the method getUrlName()\ncontaining a <plugin-url> string that you can navigate by using the link: http(s)://<jenkins_server>/<plugin-url>\n\n3. In jelly file, insert the following element:\n\n<l:svgIcon tooltip=\"<img src=a onerror=alert(1)>\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"></path></l:svgIcon>\n\nThis creates an icon that triggers the Cross-Site Scripting when the mouse is over and opens tooltip. Obviously, you can use css and large size and height to generate a svg element that covers all the screen in order to trigger the XSS when the user navigates the page.\n\nSolution:\n\nThe following releases contain fixes for security vulnerabilities:\n* Jenkins 2.252\n* Jenkins LTS 2.235.4","sha256":"d0a9f0afd98978210b9b166b1abcd26153d8e4fff4be8edf1112507f13d3cff6","bytes":3445,"fetchedAt":"2026-11-26T14:07:26.291Z","encoding":"utf-8 (display only; download retains original bytes)"}