Bug 540989 (CVE-2021-41034) - Che build incorporates binaries downloaded over http -- potential MITM risk.
Summary: Che build incorporates binaries downloaded over http -- potential MITM risk.
Status: RESOLVED FIXED
Alias: CVE-2021-41034
Product: Community
Classification: Eclipse Foundation
Component: Vulnerability Reports (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Security vulnerabilitied reported against Eclipse projects CLA
QA Contact:
URL:
Whiteboard:
Keywords: security
Depends on:
Blocks:
 
Reported: 2018-11-09 12:30 EST by Scott Gayou CLA
Modified: 2021-10-03 17:31 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Gayou CLA 2018-11-09 12:30:24 EST
The Che stacks build (https://github.com/eclipse/che-dockerfiles) have several Dockerfiles that pull down binaries over http.

While unlikely, the risk here is that a motivated and skilled attacker could potentially man-in-the-middle the build process and inject custom, malicious code.

As an example, here's the Dockerfile for alpine_jdk8 (https://github.com/eclipse/che-dockerfiles/blob/master/recipes/alpine_jdk8/Dockerfile):

```
wget -q "http://apache.ip-connect.vn.ua/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" && \
```

Ideally, the signatures for the build would be pulled down over https to verify the binaries. They are available here: https://www.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz.asc. Else, downloading directly from apache, which has a valid certificate, would be better: https://www.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

Here's the android stack (https://github.com/eclipse/che-dockerfiles/blob/master/recipes/android/Dockerfile):

```
wget --output-document=android-sdk.tgz --quiet http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
```

centos_jdk8:

```
wget -qO- "http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz" | tar -zx --strip-components=1 -C /home/user/tomcat8 && \
```

php:

```
wget http://repos.zend.com/zend-server/9.0.2/deb_apache2.4/pool/zend-server-php-7.0-common_9.0.2+b174_amd64.deb
```

and there are probably more.
Comment 1 Wayne Beaton CLA 2020-01-10 11:52:06 EST
The handbook provide guidance for handling vulnerability reports.

https://www.eclipse.org/projects/handbook/#vulnerability
Comment 2 Mario Loriedo CLA 2020-01-10 12:51:42 EST
Thank you for reporting this issue Scott. 

We are not using the Dockerfiles in https://github.com/eclipse/che-dockerfiles since version 7.0.0 of Che (august this year).

We are currently using the repositories in https://github.com/che-dockerfiles.

We need to investigate if the vulnerability exist for the new Dockerfiles. From a first look it doesn't seam it's the case.
Comment 3 Wayne Beaton CLA 2021-09-20 16:16:41 EDT
What is the status of this?

Is a CVE for the affected versions required?
Comment 4 Mario Loriedo CLA 2021-09-22 05:52:24 EDT
We never issued a CVE related to this issue. The mentioned repository is not used anymore but was used for Che 6.x releases.
Comment 5 Wayne Beaton CLA 2021-09-22 12:47:00 EDT
(In reply to Mario Loriedo from comment #4)
> We never issued a CVE related to this issue. The mentioned repository is not
> used anymore but was used for Che 6.x releases.

Does that mean that the vulnerability is in the 6.x releases? If yes, then my recommendation is that assign a CVE. 

I do, however, defer to your judgement. If you agree that we should assign a CVE, then please help me by providing a short write up and CWE. If you disagree, then please close this issue.
Comment 6 Mario Loriedo CLA 2021-09-23 17:43:35 EDT
I do agree that we should create a CVE. I will provide you the required details tomorrow.
Comment 7 Mario Loriedo CLA 2021-09-24 06:41:43 EDT

Project name: Eclipse Che

Project id: ecd.che

Versions affected: [6.x]

Common Weakness Enumeration:

- CWE-924: Improper Enforcement of Message Integrity During Transmission in a Communication Channel

Summary:

The build of some language stacks of Eclipse Che version 6 includes pulling some binaries from an unsecured HTTP endpoint. As a consequence the builds of such stacks are vulnerable to MITM attacks that allow the replacement of the original binaries with arbitrary ones. The stacks involved are Java 8 (alpine and centos), Android and PHP. The vulnerability is not exploitable at runtime but only when building Che.

Links:

- https://bugs.eclipse.org/bugs/show_bug.cgi?id=540989
Comment 8 Wayne Beaton CLA 2021-09-29 17:36:27 EDT
I've created CVE-2021-41034.

If we're done here, please resolve the issue as FIXED.