SecurityContext

CVE-2022-39207: OneDev - Stored XSS

  • Cve: CVE-2022-39207
  • Name: OneDev - Stored XSS
  • Description: Onedev is an open source, self-hosted Git Server with CI/CD and Kanban. During CI/CD builds, it is possible to save build artifacts for later retrieval. They can be accessed through OneDev's web UI after the successful run of a build. These artifact files are served by the webserver in the same context as the UI without any further restrictions. This leads to Cross-Site Scripting (XSS) when a user creates a build artifact that contains HTML. When accessing the artifact, the content is rendered by the browser, including any JavaScript that it contains. Since all cookies (except for the rememberMe one) do not set the HttpOnly flag, an attacker could steal the session of a victim and use it to impersonate them. To exploit this issue, attackers need to be able to modify the content of artifacts, which usually means they need to be able to modify a project's build spec. The exploitation requires the victim to click on an attacker's link. It can be used to elevate privileges by targeting admins of a OneDev instance. In the worst case, this can lead to arbitrary code execution on the server, because admins can create Server Shell Executors and use them to run any command on the server. This issue has been patched in version 7.3.0. Users are advised to upgrade. There are no known workarounds for this issue.
  • Impact: Attackers can execute scripts in the victim's browser, steal session cookies, escalate privileges, and potentially execute arbitrary commands on the server.
  • Remediation: Upgrade to version 7.3.0 or later.
  • Vulnerability type: stored_xss
  • Vulnerability impact: client_script_exec, information_disclosure, privilege_escalation
  • Requirement type: user_interaction
  • Requirements: Attacker needs to modify artifact content and victim to click malicious link.
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.4
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.01029
  • Epss percentile: 0.64535
  • Assignee: [email protected]
  • Published at: 2022-09-13T19:15:13Z
  • Age in days: 1533
  • Modified at: 2026-06-17T04:57:54Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-39207
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

Public exploits

UrlSourceAdded date
https://blog.sonarsource.com/onedev-remote-code-execution/nvd2022-09-13

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/theonedev/onedev/commit/adb6e31476621f824fc3227a695232df830d83abPatch, Third Party Advisory
https://blog.sonarsource.com/onedev-remote-code-execution/Exploit, Third Party Advisory
https://github.com/theonedev/onedev/security/advisories/GHSA-27fw-gv88-qrpgThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
onedev_project:onedev< 7.3.0nonvd/v1/products/onedev_project/onedev

Projects

RepositoryLink kindsIndexedUrl
theonedev/onedevcommit, fix, security_advisoryyes/v1/repositories/theonedev/onedev

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2022-09-13
  • Remote: yes
  • Authentication required: yes
  • Exposed hosts: 7
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports