Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-12147 Overview
CVE-2025-12147 affects Search Guard FLX versions 3.1.1 and earlier. The vulnerability stems from improper enforcement of Field-Level Security (FLS) rules on object-valued fields. When an FLS exclusion rule such as ~field is applied to a field containing an object, the object is removed from the _source returned by search operations. However, child attributes of the excluded object remain accessible to search queries. Authenticated adversaries can infer or reconstruct the contents of fields that administrators intended to hide. This weakness is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Critical Impact
Authenticated users with search privileges can bypass FLS exclusion rules on object-valued fields and reconstruct sensitive data that should remain confidential.
Affected Products
- Search Guard FLX 3.1.1
- Search Guard FLX versions prior to 3.1.1
- Search Guard FLX deployments using FLS exclusion rules on object-valued attributes
Discovery Timeline
- 2025-10-29 - CVE CVE-2025-12147 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2025-12147
Vulnerability Analysis
Search Guard FLX provides Field-Level Security to restrict which document fields authorized users can view. Administrators define exclusion rules using the ~field syntax to strip sensitive fields from query responses. The product enforces these rules correctly against the document _source returned by search APIs.
The enforcement logic breaks down when the excluded field holds an object rather than a scalar value. The parent object is removed from _source, but the child attributes remain indexed and queryable. An authenticated user can issue search queries that reference the hidden child attributes directly and infer their values through query matches, aggregations, or sort behavior.
This gap in enforcement turns a confidentiality control into a partial filter. The vulnerability does not grant write access or affect availability, but it undermines data segregation inside shared indexes.
Root Cause
The FLS engine applies exclusion filtering at the _source projection layer rather than at the query planning layer. When the engine encounters an object exclusion like ~object, it removes object from the response document but does not recursively exclude object.* members from query evaluation. Child fields remain searchable, aggregatable, and sortable.
Attack Vector
An attacker needs valid credentials with search privileges on an index that uses an object-valued FLS exclusion rule. The attacker constructs queries targeting the known or guessed child attribute paths of the excluded object. By observing which documents match term queries, range queries, or aggregations against those child fields, the attacker reconstructs the hidden values one field or value at a time. No network-level exploitation primitives are required beyond standard Search Guard API access.
No public proof-of-concept exploitation code is available. Refer to the Search Guard CVE Advisory for vendor technical details.
Detection Methods for CVE-2025-12147
Indicators of Compromise
- Search queries from authenticated users that reference child attribute paths (object.member) of fields covered by FLS exclusion rules.
- Unusual volumes of term, range, or aggregation queries targeting the same object child attribute within short time windows.
- Query patterns resembling value enumeration, such as repeated term queries differing only in a single value.
Detection Strategies
- Audit Search Guard query logs for references to child paths of objects configured in FLS exclusion rules.
- Compare the role-to-field access matrix against observed query field usage to flag out-of-policy field access.
- Enable Search Guard audit logging at the REQUEST level to capture full query bodies for review.
Monitoring Recommendations
- Forward Search Guard and Elasticsearch audit logs to a centralized SIEM for correlation with user identity and session context.
- Alert when roles subject to object-valued FLS exclusion rules execute queries that mention the excluded object's attribute namespace.
- Baseline normal query patterns per role and alert on deviations consistent with field enumeration.
How to Mitigate CVE-2025-12147
Immediate Actions Required
- Upgrade Search Guard FLX to version 3.1.2 or later as documented in the Search Guard Changelog 3.1.2.
- Inventory all roles that use FLS exclusion rules and identify which rules target object-valued fields.
- Review audit logs for prior queries that may have accessed child attributes of excluded objects.
Patch Information
Search Guard has released Search Guard FLX 3.1.2, which corrects FLS enforcement for object-valued fields. Review the Search Guard Changelog 3.1.2 for upgrade instructions and the Search Guard CVE Advisory for the full vendor statement.
Workarounds
- If immediate upgrade is not possible and FLS exclusion rules apply to object-valued attributes, add an explicit exclusion rule for the object members using the wildcard pattern ~object.* alongside the existing ~object rule.
- Validate the workaround by issuing test queries against child attribute paths and confirming they return no matches for restricted roles.
- Restrict search privileges on affected indexes to the minimum set of roles until the upgrade is applied.
# Example Search Guard roles configuration adding child-member exclusion
# roles.yml fragment
restricted_role:
index_permissions:
- index_patterns:
- "sensitive-index-*"
fls:
- "~object"
- "~object.*"
allowed_actions:
- "read"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

