Elasticsearch transform migration can quietly strip document-level security
Elasticsearch transforms can copy source documents into a destination index while stored security headers preserve the original user's document-level restrictions. CVE-2026-139851 affects an automatic configuration migration that can drop those headers. Later source searches may run without the intended restriction, allowing a user who can access the transform destination to read source documents that should remain hidden.
Affected releases
The Elastic advisory covers Elasticsearch 8.18.0 through 8.19.20, 9.0.0 through 9.4.5, and 9.5.0 through 9.5.1. Fixed releases are 8.19.21, 9.4.6, and 9.5.2. The CVSS v3.1 score is 6.5. The issue is an incorrect authorization defect rather than a direct anonymous read.
Why transform metadata matters
Document-level security depends on the identity and headers stored with the processing context. A transform may run with elevated privileges or service-account access. If migration removes the headers that tie a search to the original user, the transform can cross a boundary that the index design intended to preserve.
The vulnerable condition appears after a migration, so a cluster may look healthy while its transform configuration has changed. Standard index health and search availability checks will not expose the missing security context.
Remediation and verification
Upgrade to a fixed release. Inventory transforms that read protected indices and compare their stored security headers, source indices, destination indices, and ownership with the expected design. Re-run a test with two users who have different document-level permissions and confirm that the destination cannot reveal documents the user is not allowed to read.
Review searches of transform destinations during the affected window. Focus on users who should not have access to the source documents, newly created dashboards or saved searches, and role changes that expanded destination access. Preserve relevant audit logs before changing roles.
Temporarily reduce access to affected transform destinations while validation is incomplete. Do not assume that a successful transform or a green cluster status proves that its security metadata survived migration correctly.
Control the migration path
Treat security headers as part of the transform configuration contract. Add a post-migration assertion that compares them with a known-good baseline. Test upgrades in a copy of the production cluster and include a negative authorization case, not just a successful result for an administrator.