Update dependency org.eclipse.jetty:jetty-webapp to v9.4.33.v20201020 [SECURITY] #311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
9.2.10.v20150310
->9.4.33.v20201020
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2020-27216
Impact
On Unix like systems, the system's temporary directory is shared between all users on that system. A collocated user can observe the process of creating a temporary sub directory in the shared temporary directory and race to complete the creation of the temporary subdirectory. If the attacker wins the race then they will have read and write permission to the subdirectory used to unpack web applications, including their WEB-INF/lib jar files and JSP files. If any code is ever executed out of this temporary directory, this can lead to a local privilege escalation vulnerability.
Additionally, any user code uses of WebAppContext::getTempDirectory would similarly be vulnerable.
Additionally, any user application code using the
ServletContext
attribute for the tempdir will also be impacted.See: https://javaee.github.io/javaee-spec/javadocs/javax/servlet/ServletContext.html#TEMPDIR
For example:
Example: The JSP library itself will use the container temp directory for compiling the JSP source into Java classes before executing them.
CVSSv3.1 Evaluation
This vulnerability has been calculated to have a CVSSv3.1 score of 7.8/10 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Patches
Fixes were applied to the 9.4.x branch with:
These will be included in releases: 9.4.33, 10.0.0.beta3, 11.0.0.beta3
Workarounds
A work around is to set a temporary directory, either for the server or the context, to a directory outside of the shared temporary file system.
For recent releases, a temporary directory can be created simple by creating a directory called
work
in the ${jetty.base} directory (the parent directory of thewebapps
directory).Alternately the java temporary directory can be set with the System Property
java.io.tmpdir
. A more detailed description of how jetty selects a temporary directory is below.The Jetty search order for finding a temporary directory is as follows:
WebAppContext
has a temp directory specified, use it.ServletContext
has thejavax.servlet.context.tempdir
attribute set, and if directory exists, use it.${jetty.base}/work
directory exists, use it (since Jetty 9.1)ServletContext
has theorg.eclipse.jetty.webapp.basetempdir
attribute set, and if the directory exists, use it.System.getProperty("java.io.tmpdir")
and use it.Jetty will end traversal at the first successful step.
To mitigate this vulnerability the directory must be set to one that is not writable by an attacker. To avoid information leakage, the directory should also not be readable by an attacker.
Setting a Jetty server temporary directory.
Choices 3 and 5 apply to the server level, and will impact all deployed webapps on the server.
For choice 3 just create that work directory underneath your
${jetty.base}
and restart Jetty.For choice 5, just specify your own
java.io.tmpdir
when you start the JVM for Jetty.Setting a Context specific temporary directory.
The rest of the choices require you to configure the context for that deployed webapp (seen as
${jetty.base}/webapps/<context>.xml
)Example (excluding the DTD which is version specific):
References
Similar Vulnerabilities
Similar, but not the same.
For more information
The original report of this vulnerability is below:
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.