# CVE-2022-42467: h2 webconsole (available only in prototype mode) should nevertheless be disabled by default.

> The h2 webconsole in Apache Isis prototype mode was enabled by default, allowing direct database access; developers must now explicitly enable it via configuration.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Oct 2022
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-998r-j9rx-qm8m

## What is CVE-2022-42467?

CVE-2022-42467 is a medium-severity vulnerability in Apache Isis, published on 19 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

When running in prototype mode, the h2 webconsole module (accessible from the Prototype menu) is automatically made available with the ability to directly query the database. It was felt that it is safer to require the developer to explicitly enable this capability. As of 2.0.0-M8, this can now be done using the 'isis.prototyping.h2-console.web-allow-remote-access' configuration property; the web console will be unavailable without setting this configuration. As an additional safeguard, the new 'isis.prototyping.h2-console.generate-random-web-admin-password' configuration parameter (enabled by default) requires that the administrator use a randomly generated password to use the console. The password is printed to the log, as "webAdminPass: xxx" (where "xxx") is the password. To revert to the original behaviour, the administrator would therefore need to set these configuration parameter: isis.prototyping.h2-console.web-allow-remote-access=true isis.prototyping.h2-console.generate-random-web-admin-password=false Note also that the h2 webconsole is never available in production mode, so these safeguards are only to ensure that the webconsole is secured by default also in prototype mode.

Weakness: CWE-1188 (Initialization of a Resource with an Insecure Default)

## Which versions are affected by CVE-2022-42467?

2 open source packages ship an affected version, including org.apache.isis.core:isis-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.isis.core:isis-core` | Maven | All versions | 2.0.0-M8 |
| `org.apache.isis.core:isis-core` | Maven | All versions | 2.0.0-M8 |

Products: Apache Isis.

## How do I fix CVE-2022-42467?

Upgrade org.apache.isis.core:isis-core to 2.0.0-M8 or later.

## Is CVE-2022-42467 being exploited?

There is no known exploitation of CVE-2022-42467 in the wild and no public exploit code.

## Other vulnerabilities in Apache Isis

- [CVE-2022-42466](https://insights.sbomify.com/CVE-2022-42466/): XSS vulnerability, eg for String properties. (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-42467 and fix it if it is affected.

What it is: CVE-2022-42467 is a medium-severity vulnerability in Apache Isis, published on 19 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-42467 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.isis.core:isis-core (Maven): affected all versions; fixed in 2.0.0-M8
- org.apache.isis.core:isis-core (Maven): affected all versions; fixed in 2.0.0-M8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-42467/ (Markdown: https://insights.sbomify.com/CVE-2022-42467/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-42467
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-42467
- OSV: https://osv.dev/vulnerability/CVE-2022-42467

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-42467/
Summaries are generated and may contain mistakes; the official description above is the record.
