Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SECURITY] Code generator generates projects with insecure repositories #9210

Closed
JLLeitschuh opened this issue Feb 24, 2019 · 5 comments
Closed

Comments

@JLLeitschuh
Copy link
Contributor

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

This project is generating starter projects that are resolving dependencies over HTTP instead of HTTPS.

Additionally, the sample associated with this project are vulnerable to this as well. 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

repositories {
maven { url 'http:https://repo.jfrog.org/artifactory/gradle-plugins' }
}

mavenCentral(artifactUrls: ['http:https://maven.springframework.org/milestone'])
maven { url "http:https://$artifactory:8080/artifactory/repo" }

repositories {
maven { url 'http:https://repo.jfrog.org/artifactory/gradle-plugins' }
}

mavenCentral(artifactUrls: ['http:https://maven.springframework.org/milestone'])
maven { url "http:https://$artifactory:8080/artifactory/repo" }

maven { url "http:https://dl.bintray.com/kotlin/ktor" }

resolvers += "TM" at "http:https://maven.twttr.com"

resolvers += "Sonatype OSS Snapshots" at "http:https://oss.sonatype.org/content/repositories/snapshots/"
resolvers += "Sonatype OSS Releases" at "http:https://oss.sonatype.org/content/repositories/releases/"

Public Disclosure

This issue requires public disclosure as it impacts users that have used this project to generate their starter projects.

A project maintainer needs to file for a CVE number to inform the public about this vulnerability.

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

@JLLeitschuh
Copy link
Contributor Author

Ping!

frantuma added a commit that referenced this issue Apr 19, 2019
frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Apr 19, 2019
frantuma added a commit that referenced this issue Apr 19, 2019
frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Apr 19, 2019
@frantuma
Copy link
Member

frantuma commented Aug 5, 2019

fixed in #9389

@frantuma frantuma closed this as completed Aug 5, 2019
@JLLeitschuh
Copy link
Contributor Author

Has a CVE been issued?

@JLLeitschuh
Copy link
Contributor Author

Also, what version was this released as 'fixed' in?

@frantuma
Copy link
Member

frantuma commented Aug 7, 2019

we are working on the CVE process, and will notify about updates

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

No branches or pull requests

2 participants