ElasticsearchDatabase / datastore · Elastic

CVE-2023-49921

MEDIUM · 6.5 CVSS v3.1 Published 2024-07-26
Fix available
A fix is available. Upgrade to 7.17.16 / 8.11.2 or later.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
An issue was discovered by Elastic whereby Watcher search input logged the search query results on DEBUG log level. This could lead to raw contents of documents stored in Elasticsearch to be printed in logs. Elastic has released 8.11.2 and 7.17.16 that resolves this issue by removing this excessive logging. This issue only affects users that use Watcher and have a Watch defined that uses the search input and additionally have set the search input’s logger to DEBUG or finer, for example using: org.elasticsearch.xpack.watcher.input.search, org.elasticsearch.xpack.watcher.input, org.elasticsearch.xpack.watcher, or wider, since the loggers are hierarchical.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Elastic Watcher's search input had excessive DEBUG-level logging that could output raw Elasticsearch document contents to logs. This only affects users with Watcher enabled who have configured the Watcher input loggers (org.elasticsearch.xpack.watcher.input.search or parent loggers) to DEBUG or finer granularity.

MitigationUpgrade to Elastic 8.11.2 or 7.17.16, or ensure the Watcher input loggers are set to INFO level or higher (coarser than DEBUG) to prevent document contents from being written to logs.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ElasticsearchDatabase / datastore
Affected:>= 7.0.0, < 7.17.16>= 8.0.0, < 8.11.2

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed Elasticsearch version
    Run `curl -s localhost:9200` or `GET /` via API to retrieve the version number. Alternatively, check the installed package version via your package manager (dpkg -r, rpm -qi, etc.).
    Affected if The version is >= 7.0.0 and < 7.17.16, or >= 8.0.0 and < 8.11.2
  2. Verify Watcher is enabled
    Check if the x-pack watcher plugin is installed and enabled. Run `GET _cluster/settings` and look for `xpack.watcher.enabled` or check for the watcher plugin directory in `plugins/x-pack-watcher`. You can also query `GET _xpack/usage` and check if watcher is active.
    Affected if Watcher is enabled and running in the cluster
  3. Check Watcher input logger configuration
    Locate the Elasticsearch logging configuration file (typically `log4j2.properties` or `log4j2.yml` in the `config` directory). Search for logger entries matching `org.elasticsearch.xpack.watcher.input.search` or its parent logger `org.elasticsearch.xpack.watcher.input`. Also check for any wildcard entries under `org.elasticsearch.xpack.watcher`.
    Affected if The logger for org.elasticsearch.xpack.watcher.input.search or its parent is set to DEBUG, TRACE, or ALL (any level finer than INFO)
  4. Inspect runtime logger settings
    If logging configuration can be adjusted at runtime via the logging API, check current settings: `GET /_cluster/settings` may contain transient logging configurations. Also review actual log output for the Watcher input components to see if DEBUG-level messages are being written.
    Affected if DEBUG-level logging messages for search input are appearing in Elasticsearch logs

You are affected if your Elasticsearch version falls within the vulnerable ranges AND Watcher is enabled AND the Watcher input loggers are configured to DEBUG or finer granularity, allowing raw document contents to be written to logs.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 7.17.16 / 8.11.2 or later
Fixed in 7.17.168.11.2
Interim mitigation

Upgrade to Elastic 8.11.2 or 7.17.16, or ensure the Watcher input loggers are set to INFO level or higher (coarser than DEBUG) to prevent document contents from being written to logs.

Recommended fix High confidence

Elasticsearch 7.17.16 or 8.11.2 (depending on your major version)

  1. 1. Identify the current Elasticsearch version by running: GET /
  2. 2. For Elasticsearch 7.x users: Plan upgrade to version 7.17.16
  3. 3. For Elasticsearch 8.x users: Plan upgrade to version 8.11.2
  4. 4. Create a full backup/snapshot of the Elasticsearch cluster before upgrading
  5. 5. Review Elastic's upgrade documentation and breaking changes for your version path
  6. 6. Perform the upgrade following Elastic's standard upgrade procedure (rolling upgrade or full cluster restart depending on architecture)
  7. 7. After upgrade, verify the version: GET /
  8. 8. Confirm the fix is applied by ensuring Watcher search input logs no longer contain raw document contents at DEBUG level
Caveat Standard Elasticsearch upgrade considerations apply - review breaking changes between your current version and target version, test in non-production environment first, and follow Elastic's upgrade path documentation

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Elasticsearch Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing1.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,090
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,744.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-49921 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-49921 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data