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

Update dependency com.h2database:h2 to v2 [SECURITY] #573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 17, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.h2database:h2 (source) 1.4.190 -> 2.2.220 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2021-42392

Impact

H2 Console in versions since 1.1.100 (2008-10-14) to 2.0.204 (2021-12-21) inclusive allows loading of custom classes from remote servers through JNDI.

H2 Console doesn't accept remote connections by default. If remote access was enabled explicitly and some protection method (such as security constraint) wasn't set, an intruder can load own custom class and execute its code in a process with H2 Console (H2 Server process or a web server with H2 Console servlet).

It is also possible to load them by creation a linked table in these versions, but it requires ADMIN privileges and user with ADMIN privileges has full access to the Java process by design. These privileges should never be granted to untrusted users.

Patches

Since version 2.0.206 H2 Console and linked tables explicitly forbid attempts to specify LDAP URLs for JNDI. Only local data sources can be used.

Workarounds

H2 Console should never be available to untrusted users.

-webAllowOthers is a dangerous setting that should be avoided.

H2 Console Servlet deployed on a web server can be protected with a security constraint:
https://h2database.com/html/tutorial.html#usingH2ConsoleServlet
If webAllowOthers is specified, you need to uncomment and edit <security-role> and <security-constraint> as necessary. See documentation of your web server for more details.

References

This issue was found and privately reported to H2 team by JFrog Security's vulnerability research team with detailed information.

CVE-2022-23221

H2 Console before 2.1.210 allows remote attackers to execute arbitrary code via a jdbc:h2:mem JDBC URL containing the IGNORE_UNKNOWN_SETTINGS=TRUE;FORBID_CREATION=FALSE;INIT=RUNSCRIPT substring, a different vulnerability than CVE-2021-42392.

CVE-2022-45868

The web-based admin console in H2 Database Engine through 2.1.214 can be started via the CLI with the argument -webAdminPassword, which allows the user to specify the password in cleartext for the web admin console. Consequently, a local user (or an attacker that has obtained local access through some means) would be able to discover the password by listing processes and their arguments. NOTE: the vendor states "This is not a vulnerability of H2 Console ... Passwords should never be passed on the command line and every qualified DBA or system administrator is expected to know that."


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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@yegor256
Copy link
Owner

@rultor please, try to merge

@rultor
Copy link
Collaborator

rultor commented Mar 17, 2023

@rultor please, try to merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Mar 17, 2023

@rultor please, try to merge

@renovate[bot] @yegor256 Oops, I failed. You can see the full log here (spent 6min)

    \u001b[1mat\u001b[m lombok.javac.JavacTreeMaker$SchroedingerType.getFieldCached (\u001b[1mJavacTreeMaker.java:156\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.JavacTreeMaker$TypeTag.typeTag (\u001b[1mJavacTreeMaker.java:244\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.Javac.<clinit> (\u001b[1mJavac.java:154\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.handlers.HandleGetter.<clinit> (\u001b[1mHandleGetter.java:298\u001b[m)
    \u001b[1mat\u001b[m java.lang.Class.forName0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m java.lang.Class.forName (\u001b[1mClass.java:398\u001b[m)
    \u001b[1mat\u001b[m lombok.core.SpiLoadUtil$1$1.next (\u001b[1mSpiLoadUtil.java:111\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.HandlerLibrary.loadAnnotationHandlers (\u001b[1mHandlerLibrary.java:170\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.HandlerLibrary.load (\u001b[1mHandlerLibrary.java:155\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.JavacTransformer.<init> (\u001b[1mJavacTransformer.java:43\u001b[m)
    \u001b[1mat\u001b[m lombok.javac.apt.Processor.init (\u001b[1mProcessor.java:86\u001b[m)
    \u001b[1mat\u001b[m lombok.core.AnnotationProcessor$JavacDescriptor.want (\u001b[1mAnnotationProcessor.java:87\u001b[m)
    \u001b[1mat\u001b[m lombok.core.AnnotationProcessor.init (\u001b[1mAnnotationProcessor.java:141\u001b[m)
    \u001b[1mat\u001b[m lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init (\u001b[1mAnnotationProcessor.java:53\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init> (\u001b[1mJavacProcessingEnvironment.java:691\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next (\u001b[1mJavacProcessingEnvironment.java:791\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs (\u001b[1mJavacProcessingEnvironment.java:886\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run (\u001b[1mJavacProcessingEnvironment.java:1227\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing (\u001b[1mJavacProcessingEnvironment.java:1340\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.main.JavaCompiler.processAnnotations (\u001b[1mJavaCompiler.java:1254\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.main.JavaCompiler.compile (\u001b[1mJavaCompiler.java:936\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0 (\u001b[1mJavacTaskImpl.java:104\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.api.JavacTaskImpl.handleExceptions (\u001b[1mJavacTaskImpl.java:147\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.api.JavacTaskImpl.doCall (\u001b[1mJavacTaskImpl.java:100\u001b[m)
    \u001b[1mat\u001b[m com.sun.tools.javac.api.JavacTaskImpl.call (\u001b[1mJavacTaskImpl.java:94\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (\u001b[1mJavaxToolsCompiler.java:125\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (\u001b[1mJavacCompiler.java:169\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (\u001b[1mAbstractCompilerMojo.java:825\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.compiler.CompilerMojo.execute (\u001b[1mCompilerMojo.java:129\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (\u001b[1mDefaultBuildPluginManager.java:137\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (\u001b[1mMojoExecutor.java:370\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (\u001b[1mMojoExecutor.java:351\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:215\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:171\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:163\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:294\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:960\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:293\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:196\u001b[m)
    \u001b[1mat\u001b[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:566\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] Re-run Maven using the \u001b[1m-X\u001b[m switch to enable full debug logging.
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] For more information about the errors and possible solutions, please read the following articles:
[\u001b[1;31mERROR\u001b[m] \u001b[1m[Help 1]\u001b[m http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
\u001b[0m\u001b[0mcontainer 5f17af0384142ea09d2f0d549ce411b275a46dd6774e9f6deef1ae0548177b38 is dead
Fri 17 Mar 2023 09:38:15 AM CET

@renovate renovate bot force-pushed the renovate/maven-com.h2database-h2-vulnerability branch from 9059f8e to bb711f5 Compare July 7, 2023 21:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants