Skip to content

known security issue in dropwizard-jetty version 2.0.21 (sub-)dependency #3969

Closed

Description

@mschwenke-up

Hi there,

please bump jetty to 2.34 or 3.0.2 or above as mentioned under Solution in the following security notice of nist:

ID: 3392a333f9525d590a865cc11b9b2fdbdb29714e128b9265cc1629b338783876
Severity: Medium
Name: Incorrect Permission Assignment for Critical Resource
Message: Incorrect Permission Assignment for Critical Resource in org.glassfish.jersey.core/jersey-common
Solution: Upgrade to versions 2.34, 3.0.2 or above.
In: code/build.gradle (org.glassfish.jersey.core/jersey-common:2.33)
Link: https://nvd.nist.gov/vuln/detail/CVE-2021-28168

thank you.

Activity

  1. joschi commented on May 16, 2021

    @joschi
    Member

    @mschwenke-up Thanks for reporting this! Unfortunately, this is not a straight forward dependency update.

    Jersey 3.x is using the Jakarta EE namespace jakarta.* instead of javax.*, so we won't upgrade to Jersey 3.x in Dropwizard 2.x because we'd also need to upgrade every single dependency or integration with Jersey as well. This includes at least Jetty, Hibernate Validator, and Jackson.

    As for Jersey 2.34, it introduced its own provider for Optional<T> parameters which has a different behavior than the one used in Dropwizard since Dropwizard 1.0.0 (#1365).

    This has been outlined in eclipse-ee4j/jersey#4651 (comment) (and following comments) and eclipse-ee4j/jersey#4790 and it would break existing users of Dropwizard who are using Optional<T> parameters in query parameters, headers, or cookies.

    The advisory at GHSA-c43q-5hpj-4crv describes a workaround by defining an application-specific temporary directory via the java.io.tmpdir system property, which I would recommend doing for the time being.

    @dropwizard/committers Any opinions on breaking existing consumers (for Optional<T> parameters) with Jersey 2.34+?

  2. jplock commented on May 16, 2021

    @jplock
    Member

    Unless we can define the tmpdir system property within the framework somehow, I think security issues take precedence over backward compatibility breaks. Assuming we can document it well enough.

  3. joschi commented on May 18, 2021

    @joschi
    Member

    In my opinion the Optional<T> parameter converter in Jersey 2.34 (and Jersey 3.0.1) is seriously broken while this security issue can be easily mitigated for existing users.

    Next issue: The Optional<T> parameter converter doesn't support custom types (eclipse-ee4j/jersey#4798).

  4. fliden commented on Aug 30, 2021

    @fliden

    Resolving vulnerabilities and we're getting flagged for jersey-commons:2.33 as well via Dropwizard, any plans to upgrade to 2.34 by any chance?

  5. joschi commented on Aug 31, 2021

    @joschi
    Member

    @fliden The comments from #3969 (comment) still apply and Jersey 2.35 hasn't been released yet.

  6. mleegwt commented on Sep 10, 2021

    @mleegwt
    Contributor

    I noticed that Jersey 2.35 has been released.

  7. joschi commented on Sep 11, 2021

    @joschi
    Member

    @mleegwt The Optional<T> support is still "sub-optimal" and incompatible with how Dropwizard handled them. Unfortunately one cannot override these providers to retain the old behavior.

    eclipse-ee4j/jersey#4790

  8. added this to the 2.1.0 milestone on Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions