Skip to content

OpenSearch Reporting plugin - RCE vector in bundled Headless Chromium

High
CEHENKLE published GHSA-pm2x-4c64-x8g7 Sep 1, 2022

Package

npm /dashboards-reports/public/components/main/main_utils.tsx (npm)

Affected versions

<=1.3.4 and <=2.2.0

Patched versions

1.3.5, 2.2.1

Description

Impact

The instance of Chromium included within the OpenSearch Dashboards reporting plugin contains a memory corruption issue which may allow authorized users to execute arbitrary commands. This issue does not impact the Minimal distributions of OpenSearch Dashboards.

Related CVEs

CVE-2020-6383 (https://bugs.chromium.org/p/chromium/issues/detail?id=1051017)

Patches

We have addressed this issue in OpenSearch 1.3.5 and 2.2.1. Users can protect themselves by updating their clusters to use the latest version of OpenSearch from https://opensearch.org/downloads.html

References:

Workarounds

Users who wish to address this issue without upgrading to the latest version of the plugin can either:

  1. Update the headless Chromium binary in the reporting plugin by replacing it with the latest version
    1.1) Download the latest headless Chromium binary from https://www.chromium.org/getting-involved/download-chromium
    1.2) Replace the content of opensearch-dashboards/plugins/reportsDashboards/.chromium directory with extracted chromium
    1.3) Rename chromium executable binary to headless_shell
    1.4) Make sure opensearch-dashboards/plugins/reportsDashboards/.chromium/headless_shell exists and is executable.

  2. Disable JIT:
    2.1) Copy the script text below into a file and name is disable_jit.sh
    2.2) Copy disable_jit.sh script to opensearch-dashboards directory
    2.3) Run cd opensearch-dashboards && ./disable_jit.sh

#!/usr/bin/env bash
set -eo pipefail
set -x

REPORTING_DIR=$(ls -d plugins/*reports*)
[ -x "$REPORTING_DIR/.chromium/headless_shell_exec" ] && echo 'Script is already applied, exiting.' && exit 0

mv "$REPORTING_DIR"/.chromium/headless_shell "$REPORTING_DIR"/.chromium/headless_shell_exec

tee "$REPORTING_DIR"/.chromium/headless_shell >/dev/null << 'EOF'
#!/usr/bin/env bash
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" &> /dev/null && pwd 2> /dev/null)"
exec "$SCRIPT_DIR"/headless_shell_exec --js-flags="--jitless --no-opt" --disable-features=V8OptimizeJavascript "$@"
EOF

chmod +x "$REPORTING_DIR"/.chromium/headless_shell
echo "Patching finished, exiting."

References

For more information

If you have any questions or comments about this advisory, please email us at [email protected]

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

CVE ID

No known CVE

Weaknesses