PT-2021-14360 · Onedev · Onedev

Pwntester

·

Published

2021-01-15

·

Updated

2021-01-21

·

CVE-2021-21250

CVSS v3.1

7.7

High

VectorAV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Name of the Vulnerable Software and Affected Versions: OneDev versions prior to 4.0.3
Description: OneDev is an all-in-one devops platform. In OneDev, there is a critical issue that may lead to arbitrary file read. When BuildSpec is provided in XML format, the spec is processed by XmlBuildSpecMigrator.migrate(buildSpecString), which processes the XML document without preventing the expansion of external entities. These entities can be configured to read arbitrary files from the file system and dump their contents in the final XML document to be migrated. If the files are dumped in properties included in the YAML file, it will be possible for an attacker to read them. If not, it is possible for an attacker to exfiltrate the contents of these files Out Of Band.
Recommendations: For versions prior to 4.0.3, update to version 4.0.3 or later, which addresses the issue by ignoring ENTITY instructions in xml files. As a temporary workaround, consider disabling the XmlBuildSpecMigrator.migrate(buildSpecString) function until a patch is available. Restrict access to the buildSpecString parameter to minimize the risk of exploitation. Avoid using the buildSpecString parameter in the affected XML endpoint until the issue is resolved.

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2021-21250
GHSA-9PPH-8GFC-6W2R

Affected Products

Onedev