# CVE-2017-16228: Dulwich RCE Vulnerability

Source: https://junglewise.ai/threats/cve-2017-16228-dulwich-rce-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-10-29  
License: CC BY 4.0 with a link back

CVE-2017-16228 · Severity: low · CVSS 3 · Published 2017-10-29

Dulwich before 0.18.5, when an SSH subprocess is used, allows remote attackers to execute arbitrary commands via an ssh URL with an initial dash character in the hostname, a related issue to CVE-2017-9800, CVE-2017-12836, CVE-2017-12976, CVE-2017-1000116, and CVE-2017-1000117.

Technologies: [dulwich (PyPI)](https://junglewise.ai/threats/technologies/dulwich). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2017-16228 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-16228 being exploited in the wild.

**How severe is CVE-2017-16228?** Low severity, with a CVSS score of 3, published 29 October 2017.

**Which products and versions are affected?** dulwich (PyPI) ECOSYSTEM:introduced=0,fixed=0.18.5.

**Is there a fix for CVE-2017-16228?** Yes. dulwich (PyPI): upgrade to 0.18.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2017-16228?** Check whether you run dulwich (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- dulwich (PyPI): upgrade to 0.18.5 or later

  ```sh
  pip install "dulwich>=0.18.5"
  ```


## Affected products

- dulwich (PyPI) ECOSYSTEM:introduced=0,fixed=0.18.5

## Identifiers

- CVE-2017-16228
- GHSA-cwwh-4382-6fwr
- PYSEC-2017-12

## Related threats

- [Dulwich arbitrary file write on Windows via unvalidated drive letters](https://junglewise.ai/threats/dulwich-arbitrary-file-write-rce-on-windows-via-unvalidated-drive-fc90311d)
- [Dulwich infinite loop denial of service in packfile object resolution](https://junglewise.ai/threats/dulwich-infinite-loop-denial-of-service-dos-in-packfile-object-d71acec7)
- [Dulwich symlink write-through in checkout via os.open](https://junglewise.ai/threats/dulwich-symlink-write-through-in-checkout-paths-via-raw-os-open-7e9ebad6)
- [Dulwich symlink directory traversal in filter-branch index_filter](https://junglewise.ai/threats/dulwich-symlink-directory-traversal-in-filter-branch-index-filter-via-c34daf58)
- [Dulwich symlink directory traversal in stash pop](https://junglewise.ai/threats/dulwich-symlink-directory-traversal-in-stash-pop-allows-arbitrary-file-12378d39)
