Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

[CVE-2019-10249][SECURITY] Releases are built/executed/released in the context of insecure/untrusted code #759

Closed
JLLeitschuh opened this issue Mar 26, 2019 · 17 comments
Assignees
Milestone

Comments

@JLLeitschuh
Copy link

CWE-829: Inclusion of Functionality from Untrusted Control Sphere
CWE-494: Download of Code Without Integrity Check

The build files indicate that this project is resolving dependencies over HTTP instead of HTTPS. Any of these artifacts could have been MITM to maliciously compromise them and infect the build artifacts that were produced. Additionally, if any of these JARs or other dependencies were compromised, any developers using these could continue to be infected past updating to fix this.

This vulnerability has a CVSS v3.0 Base Score of 8.1/10
https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

This isn't just theoretical

POC code has existed since 2014 to maliciously compromise a JAR file inflight.
See:

MITM Attacks Increasingly Common

See:

Source Locations

if (!hasProperty('JENKINS_URL')) {
ext.JENKINS_URL = 'http://services.typefox.io/open-source/jenkins'
}
// The repositories to query when constructing the Xtend compiler classpath
repositories {
jcenter()
maven {
name 'xtend-bootstrap'
url "$JENKINS_URL/job/xtend-bootstrap/lastStableBuild/artifact/build-result/maven-repository/"
}
}

Original Report

https://bugs.eclipse.org/bugs/show_bug.cgi?id=544852

This was originally responsibly disclosed privately, but I was asked to make it public by @waynebeaton.

Public Disclosure

Option 1: File for a CVE

A project maintainer for this project should probably file for a CVE number to inform the public about this vulnerability in the build for this project. The goal is to inform the public that there was a potential for published build artifacts to have been maliciously compromised in earlier releases.

If a maintainer on this project works for or is associated with a CNA, please have them file it with them:
cve.mitre.org/cve/request_id.html

Otherwise, an open source CVE should be filed for here:
iwantacve.org

Option 2: Manually validate the release artifacts

If this project's build is fully reproducible. An alternative to filing for a CVE is to go back and build the earlier releases (with the HTTPS patch applied) to confirm the artifacts were not tampered when they were built. This can be done by comparing the hashes of the artifacts built locally with the ones published. If the hashes of all previous artifacts match those that are published, you can safely assume that the releases were not tampered with.

Again, this assumes that the build if fully reproducible and will require significantly more work.

@cdietrich
Copy link
Member

cdietrich commented Mar 26, 2019

this does hold true only partially: releases are build on ci.eclipse.org with
JENKINS_URL = https://ci.eclipse.org/xtext/

cc @kthoms what do you use on CBI?

@cdietrich
Copy link
Member

TODO: what about target files / upstream repos

@cdietrich
Copy link
Member

see eclipse/xtext-maven#74 too

@cdietrich cdietrich self-assigned this Mar 26, 2019
@cdietrich cdietrich added this to the Release_2.18 milestone Mar 26, 2019
cdietrich added a commit that referenced this issue Mar 26, 2019
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
kthoms pushed a commit that referenced this issue Apr 1, 2019
use https to access typefox jenkins #759
@cdietrich
Copy link
Member

pushed to master

todo: what about the pr mirrror thing

@kthoms kthoms self-assigned this Apr 2, 2019
@cdietrich
Copy link
Member

created eclipse/xtext#1427 for mirroring

@JLLeitschuh
Copy link
Author

@cdietrich This should probably get a CVE or do you plan to perform an audit?

If you choose to go down the path of performing an audit, this may be useful:
https://reproducible-builds.org/tools/

@cdietrich
Copy link
Member

cdietrich commented May 4, 2019

@JLLeitschuh please talk to foundation staff
cc @waynebeaton

@cdietrich
Copy link
Member

@svenefftinge can you help here?

@waynebeaton
Copy link
Member

@cdietrich
Copy link
Member

cdietrich commented May 5, 2019

@waynebeaton @JLLeitschuh i find this strange.
there is a https://bugs.eclipse.org/bugs/show_bug.cgi?id=544852 reported.
then you tell @JLLeitschuh to report it publicly with this issue
instead of with the original bugzilla or a non public security bugzilla.
i also dont find it conterproductive to have 100 cvs for different (when built with tycho likely all) eclipse projects covering the same thing

@cdietrich
Copy link
Member

@waynebeaton
Copy link
Member

The link to the handbook provides information on how to actually engage the security team in this process.

I only respond to requests for CVEs from project committers. Further, as described in that handbook link, the bug needs to be closed as FIXED and the committers-only flag removed. The existing Bug 544852 serves well as further background and should be used for the request.

I'm already in copy, so I'll probably notice when this happens, but a quick note to the security team (which I see that you've already sent) makes sure that our security-minded folks are all in the loop.

@JLLeitschuh
Copy link
Author

@waynebeaton Is that aimed at me or at @cdietrich?

@cdietrich
Copy link
Member

cdietrich commented May 6, 2019

i am totally unhappy with the process and where to track what.

@cdietrich
Copy link
Member

cdietrich commented May 6, 2019

@cdietrich cdietrich changed the title [SECURITY] Releases are built/executed/released in the context of insecure/untrusted code [ CVE-2019-10249][SECURITY] Releases are built/executed/released in the context of insecure/untrusted code May 6, 2019
@cdietrich cdietrich changed the title [ CVE-2019-10249][SECURITY] Releases are built/executed/released in the context of insecure/untrusted code [CVE-2019-10249][SECURITY] Releases are built/executed/released in the context of insecure/untrusted code May 6, 2019
@cdietrich
Copy link
Member

@JLLeitschuh what could we have done (better) not to get reported this problem as a github issue but as a security bugzilla

@JLLeitschuh
Copy link
Author

JLLeitschuh commented May 6, 2019

Original Report
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544852

This was originally responsibly disclosed privately, but I was asked to make it public by @waynebeaton.

I was explicitly asked to open this publicly. My original intention was to keep it private. You can see the discussion in the original bug chain: https://bugs.eclipse.org/bugs/show_bug.cgi?id=544852

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants