Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2253
Closed
Open
Issue created Feb 27, 2019 by Jonathan Leitschuh@JLLeitschuh

[BUG][SECURITY][CVE-2019-11405] Code generator generates projects with insecure repositories

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:

  • https://max.computer/blog/how-to-take-over-the-computer-of-any-java-or-clojure-or-scala-developer/
  • https://github.com/mveytsman/dilettante

MITM Attacks Increasingly Common

See:

  • https://serverfault.com/a/153065
  • https://security.stackexchange.com/a/12050
  • Comcast continues to inject its own code into websites you visit (over HTTP)

Source Locations

https://github.com/OpenAPITools/openapi-generator/blob/c1afba71940ace713b3a88d472d1798a6e0d661a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache#L11-L13

https://github.com/OpenAPITools/openapi-generator/blob/c1afba71940ace713b3a88d472d1798a6e0d661a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache#L22-L23

https://github.com/OpenAPITools/openapi-generator/blob/0eb385c0d6497c38c09b42158b2d66109b78b15b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache#L60-L61

There are definitely more locations that I've listed here. I know that @wing328 has caught many of them here #2248. I just ask that the team take an extra sweep to check for this anywhere else and be aware of it in future PR's.

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

Assignee
Assign to
Time tracking