Reasons You Should Be Wary of Elasticsearch Servers

Elasticsearch is a fast, capable search engine, and it powers product search, site search and log analysis for thousands of businesses. It also has one of the worst track records in the industry for accidental data exposure, because a misconfigured server will hand its entire contents to anyone who finds it. The software is not the villain. The risk comes from how easily it is deployed, how much it needs to run well, and how rarely the people running it treat it like the database it effectively becomes. This guide covers nine reasons to be cautious, a hardening checklist, what Canadian privacy law expects if something goes wrong, and why the Canadian data center your index sits in matters as much as the configuration file.

Key takeaways

  • Most Elasticsearch data leaks were not hacks. They were servers left reachable from the internet with no password.
  • Elasticsearch 8.0 and later turn security on by default, so today's risk sits mainly with older versions and with clusters where someone switched security off.
  • Elasticsearch is a search index, not a system of record. Keep the authoritative copy of your data in a proper database.
  • It needs generous memory and steady maintenance. An undersized virtual server is a common source of outages.
  • Under PIPEDA, an exposed index holding personal information triggers a breach assessment and a record you must keep for 24 months, even if you cannot prove anyone accessed it.

What Is Elasticsearch, and Why Do So Many Businesses End Up Running It?

Elasticsearch is an open-source search and analytics engine built on the Apache Lucene library. It stores data as JSON documents, indexes every field, and returns full-text search results in milliseconds, even across millions of records. Applications talk to it through a REST API over HTTP, by default on port 9200.

Many businesses run Elasticsearch without ever deciding to. It arrives as a dependency:

  • E-commerce platforms. Magento Open Source and Adobe Commerce made a dedicated search engine mandatory from version 2.4, so every store on a current version runs Elasticsearch or a compatible engine.
  • WordPress and other CMS plugins. Search plugins for larger content sites offload queries to an Elasticsearch server for faster, more relevant results.
  • Logging and monitoring. The "ELK stack" (Elasticsearch, Logstash and Kibana) is a common way to collect server and application logs in one searchable place.
  • Internal tools. Developers use Elasticsearch behind dashboards, customer-support search and analytics features.

That last point matters for risk. When a tool arrives as a dependency, nobody owns it. The developer who installed it moves on, the server keeps running, and the index quietly fills with customer names, order histories or log lines containing email addresses. The reasons below are less about Elasticsearch's code than about that pattern.

Reason 1: An Exposed Elasticsearch Server Can Be Found and Read in Minutes

Elasticsearch speaks plain HTTP. If its port is reachable from the internet and access control is off, anyone with a browser can list its indexes and read the documents inside. Researchers and attackers alike use internet-scanning search engines that continuously catalogue open services, so an exposed server does not stay hidden for long.

The record of what has been found this way is long:

  • In 2018, a data aggregation firm exposed around 340 million individual records, almost 2 TB of data, through a misconfigured Elasticsearch server.
  • Later in 2018, researchers using an internet scanner found 73 GB of data on roughly 57 million people sitting in Elasticsearch clusters configured for public access.
  • In December 2019, Microsoft exposed about 250 million customer support records stored in five misconfigured Elasticsearch databases before locking them down.
  • In May 2025, security researcher Jeremiah Fowler found an exposed Elasticsearch database holding 184 million records, 47 GB in total, that included login credentials for millions of accounts. It ran on an unmanaged server controlled entirely by its operator.

These incidents span seven years, very different organizations, and every level of technical sophistication. The common thread is not a software vulnerability. It is a server that was reachable and unauthenticated.

Why exposure keeps happening

Elasticsearch itself binds to the local machine by default, which is safe. Exposure usually happens when someone changes the network setting so other servers can connect, and forgets that "other servers" now includes the whole internet. Cloud security researchers describe a second, very human pattern: teams build a test cluster with staging data and security switched off, forget it is reachable, and later load production data into the same setup.

Reason 2: Older Versions Shipped With Security Switched Off

For most of its history, Elasticsearch did not enable authentication or encryption by default. Basic security features became part of the free tier with versions 6.8 and 7.1 in 2019, but they were still switched off out of the box. Running securely meant deliberately turning them on, generating certificates and creating users. Many deployments never did.

That changed with Elasticsearch 8.0. Since that release, security is enabled and configured automatically the first time a cluster starts: user authentication is required, and traffic between nodes, and between Elasticsearch and Kibana, is encrypted with TLS. The installer prints a generated password for the built-in administrator account.

This is a genuine improvement, and it shifts where the risk lives:

  • Legacy clusters. Servers still running 6.x or 7.x releases were installed under the old defaults. If nobody added security, they are still open.
  • Security deliberately disabled. A single line in the configuration file, setting security to false, turns the protections off. Tutorials and quick-start guides sometimes recommend exactly that to "get things working."
  • Old habits on new versions. Administrators who learned on earlier releases sometimes recreate their old, insecure setups out of habit.

The practical takeaway is simple. If you run Elasticsearch, find out which version it is and whether security is actually on. Do not assume either.

Reason 3: Attackers Do Not Just Read Your Data, They Delete It

An exposed Elasticsearch server is not only a privacy problem. Because the same open API that answers queries also accepts delete commands, an attacker can wipe the data as easily as read it.

In January 2017, several hundred Elasticsearch servers were hit by ransom attacks within a few hours. Attackers erased the data and left notes demanding payment for its return. The technique mirrored a wave of attacks on exposed MongoDB servers in the same period.

In July 2020, the "Meow" attacks went further. An automated script found unsecured databases and destroyed them, leaving no ransom note at all, only index names ending in the word "meow." Elasticsearch was hit hardest. By late July, reporting counted almost 4,000 affected databases across Elasticsearch, MongoDB and Redis. Elastic said that, as far as it knew, none of the affected Elasticsearch clusters had any of its free or paid security features enabled.

Two lessons follow. First, securing access is the defence against both theft and destruction. Second, if Elasticsearch holds the only copy of something, a single attack can make it unrecoverable. That leads directly to the next reason.

Reason 4: Elasticsearch Is a Search Index, Not Your System of Record

Elasticsearch stores data, so it is tempting to treat it as a database. It was not designed to be one, and using it that way adds risk.

Traditional databases provide ACID guarantees: transactions either complete fully or not at all, and data stays consistent even through failures. Elasticsearch does not offer multi-document transactions of that kind. It is also near-real-time rather than instant. By default, newly indexed documents become searchable after a refresh interval of about one second, so a read immediately after a write may not see the new data.

Operators who have run many clusters make the same recommendation: use Elasticsearch to hold the data you need to search quickly, and let a relational or document database hold the authoritative copy. If the search cluster fails, is attacked or needs rebuilding after a bad mapping change, you re-index from the source rather than losing records.

For a typical online store, that means product, customer and order data live in the main database (MySQL or MariaDB in most Magento and WordPress setups), and Elasticsearch holds a searchable copy of the catalogue. If Elasticsearch goes down, search degrades but orders keep flowing.

Reason 5: It Is Hungry for Memory and Easy to Undersize

Elasticsearch runs on the Java Virtual Machine (JVM), and its performance depends heavily on memory in two places: the JVM heap that Elasticsearch uses directly, and the operating system's file cache that Lucene relies on to read index files quickly.

Elastic's guidance sets two ceilings for the heap. It should be no more than 50% of the server's physical memory, leaving the rest for the file cache and off-heap buffers. It should also stay below the threshold where the JVM stops using compressed object pointers, which is near 32 GB. Crossing that line makes each pointer larger and can leave a bigger heap with less usable capacity than a smaller one.

For a small business, the first rule is the one that bites. On a server with 4 GB of RAM, the heap should be about 2 GB at most, and the database, web server and PHP processes running on the same machine all compete for what remains. Symptoms of undersizing include slow searches, long garbage-collection pauses, nodes dropping out of the cluster, and the operating system's out-of-memory killer ending the Elasticsearch process. Swapping memory to disk is especially damaging to Elasticsearch performance, which is why production guides recommend disabling it.

Two practical consequences follow for hosting:

  • Shared hosting cannot run Elasticsearch. It needs root or administrator access, a long-running Java process and dedicated memory, which a shared hosting account does not provide. A virtual private server (VPS), a dedicated server or a managed search service is required.
  • Run it on a separate server when you can. Putting Elasticsearch on the same small VPS as your website means a heavy re-index can slow page loads, and a memory spike can take both down together.

Reason 6: The Stack Around It Needs Constant Patching

Elasticsearch rarely runs alone. Kibana, the dashboard most teams use to view and manage their data, has had several critical flaws in recent years.

In March 2025, Elastic patched CVE-2025-25012, a prototype pollution flaw in Kibana rated 9.9 out of 10 on the CVSS severity scale. It allowed arbitrary code execution through a crafted file upload and specific HTTP requests. In Kibana 8.15.0 through 8.17.0, a user with only the read-only Viewer role could exploit it. The fix arrived in Kibana 8.17.3. In August 2024, Elastic had fixed another prototype pollution flaw with the same 9.9 rating, CVE-2024-37287, followed a month later by two deserialization vulnerabilities rated 9.9 and 9.1.

A self-hosted cluster therefore needs a patch routine, not a one-time install. Someone has to watch Elastic's security announcements, test updates and apply them promptly, including for Kibana, Logstash, Beats agents and any plugins.

What the Log4Shell episode actually showed

Many articles list Log4Shell (CVE-2021-44228), the critical flaw in the Java logging library Log4j disclosed in December 2021, as an Elasticsearch disaster. The record is more nuanced, and it carries a better lesson. Elastic's advisory stated that supported versions of Elasticsearch running on JDK 9 or later were not susceptible to remote code execution or information leakage, because Elasticsearch runs with the Java Security Manager. Older setups on JDK 8 were exposed to an information leak through DNS lookups. Elastic released versions 7.16.1 and 6.8.21 to mitigate the issue fully.

The real lesson is about currency. Teams on supported versions with a modern Java runtime were largely protected by design. Teams running old, unsupported combinations were the ones scrambling. Staying current is itself a security control.

Reason 7: Operational Complexity Grows Faster Than Your Index

A single-node Elasticsearch server with one small index is easy. Problems appear as data, traffic and the number of indexes grow. Teams must decide how many primary shards each index needs, how many replicas to keep, how to define field mappings, how to roll over time-based log indexes, how to take and restore snapshots, and how to upgrade without downtime.

These decisions are hard to change later. A shard count fixed when an index is created cannot simply be edited, and a field mapped as the wrong type often means re-indexing everything. Engineers who have run Elasticsearch in production describe it bluntly: it takes experienced people who understand its architecture, and teams that adopt it without matching it to a real need can end up with an expensive tool that does not fit.

Analysis by Opster, an Elasticsearch operations company, of 3,154 production clusters found that only 8.2% restricted wildcard patterns for delete operations. That setting prevents a single mistyped command from deleting every index at once. The same analysis recommended changing the default cluster name, which can head off node-discovery problems and even accidental data deletion. Small, easily missed settings like these separate a resilient cluster from a fragile one.

Reason 8: Licensing Has Changed Twice in Four Years

For a business, the legal terms behind software matter as much as the code. Elasticsearch's terms have shifted repeatedly.

Until 2021, Elasticsearch was released under the permissive Apache 2.0 open-source license. In January 2021, Elastic moved its core products to a dual license: the Server Side Public License (SSPL) and its own Elastic License 2.0. Neither is recognized as open source by the Open Source Initiative. Elastic said the change responded to a large cloud provider selling a hosted Elasticsearch service that competed directly with Elastic's own. That provider then forked the last Apache-licensed version and launched OpenSearch, which remains under Apache 2.0.

In August 2024, Elastic added the OSI-approved GNU Affero General Public License (AGPL) as a third licensing option for Elasticsearch and Kibana, making them open source again. Existing users did not have to change anything.

For most businesses that simply run Elasticsearch to search their own site, none of these licenses creates a problem. The caution is for anyone offering Elasticsearch to customers as part of a hosted service, or redistributing modified versions. For them, the choice of license, or of OpenSearch instead, deserves a review by someone qualified to read software licences.

Reason 9: Your Logs and Indexes Probably Contain Personal Information

The most serious reason for caution in Canada is legal. Elasticsearch indexes are full of personal information far more often than their owners realize. A product search index may be harmless, but a customer-support index, an order search tool or a log cluster typically holds names, email addresses, IP addresses, phone numbers and sometimes payment or health details.

Under the Personal Information Protection and Electronic Documents Act (PIPEDA), mandatory breach rules have applied since November 1, 2018. A "breach of security safeguards" covers the loss of, unauthorized access to, or unauthorized disclosure of personal information resulting from a failure of safeguards. When an organization determines that a breach creates a real risk of significant harm to an individual, it must:

  1. Report the breach to the Office of the Privacy Commissioner of Canada.
  2. Notify the affected individuals.
  3. Notify other organizations or government institutions that could reduce the risk of harm.

Separately, PIPEDA requires organizations to keep a record of every breach of security safeguards involving personal information under their control, whether or not it meets the reporting threshold, for at least 24 months. Organizations that knowingly fail to report, notify or keep records can face fines of up to $100,000 per violation.

This is where Elasticsearch exposures become expensive. If you discover that an index containing customer data was reachable without a password, you usually cannot prove nobody accessed it, because detailed audit logging is often off on exactly the clusters that were left open. You must still assess the real risk of significant harm, factoring in how sensitive the data was and how likely it is to have been misused, and you must record the incident. Alberta's private-sector privacy law has required breach reporting since 2010, and Quebec and British Columbia have their own private-sector statutes, so provincial obligations can apply as well.

For any situation involving a real or suspected breach, get advice from a privacy professional or lawyer. The point here is narrower: an open search server is not a technical nuisance you can quietly fix. In Canada, it can be a reportable legal event.

Why Where Your Index Lives Matters: The Canadian Data Center Question

Configuration controls who can reach your Elasticsearch data. Location controls which laws apply to it and how complicated your accountability becomes. For Canadian organizations, both deserve attention.

PIPEDA does not require personal information to stay in Canada. It does make the organization that collected the information accountable for it wherever it is processed, and the Privacy Commissioner expects organizations to tell people when their information may be processed in another country and accessed by that country's courts and authorities. Keeping an index, and everything connected to it, in a Canadian data center removes that cross-border layer and makes the accountability trail far easier to document.

The catch with Elasticsearch is that data spreads. A cluster in Toronto may still send copies elsewhere:

  • Backups are often written to object storage buckets, which may sit in a foreign region by default.
  • Managed services. Hosted Elasticsearch providers let you choose a region. Elastic's own cloud service offers Canadian regions, but you have to select them.
  • Log shippers and monitoring. Agents may forward logs or metrics to a third-party monitoring service hosted abroad.
  • Replicas and disaster recovery copies. A second cluster for resilience can end up in a different country if nobody checks.

When you map where your Elasticsearch data lives, include all four. A Canadian primary cluster with US-hosted snapshots is not a Canadian deployment from an accountability point of view.

Should You Self-Host, Use a Managed Service, or Skip Elasticsearch?

Not every business that runs Elasticsearch needs to. The right choice depends on how much search matters to the business, how sensitive the data is, and who will maintain it.

Situation

Practical choice

Why

Small brochure site or blog with modest content

Skip Elasticsearch; use the CMS's built-in search or a lightweight plugin

Database full-text search is usually enough, with no extra server to secure

Online store on Magento or Adobe Commerce

Run the required search engine on a separate, firewalled VPS, or use a managed search service

The platform needs it, but it should never be reachable from the internet

Content site with hundreds of thousands of pages

Self-host on a properly sized VPS, or use a managed service in a Canadian region

Search quality matters, and the index can be rebuilt from the database

Centralized logging that contains personal information

Managed service in a Canadian region, or a self-hosted cluster with a named owner and audit logging

Logs are sensitive and often overlooked; ownership and monitoring are essential

No in-house administrator and no budget for one

Avoid self-hosting entirely

An unowned Elasticsearch server is the single biggest risk factor in the incident record

Two further options are worth knowing about. OpenSearch, the Apache-licensed fork, is a reasonable alternative where licensing is a concern. And for many small sites, the relational database already powering the site offers full-text search that is good enough, with nothing new to secure.

A realistic example

Consider a Vancouver home-goods retailer moving its Magento store to Canadian web hosting. The previous developer ran Elasticsearch on the same small server as the store, with the port open so a separate staging site could reach it. The store worked, but searches slowed to a crawl during re-indexing, and nobody could say whether the open port had ever been found.

The fix was straightforward once the risk was clear. The store moved to one VPS and Elasticsearch to a second, smaller VPS in the same Canadian data center, connected over a private network. The search server's firewall accepted connections only from the store server. Security was confirmed on, snapshots were scheduled to storage in Canada, and the developer was named as owner of the patch schedule. Because the old server had held customer names and order details in its index, the retailer also documented the earlier exposure in its breach records and took advice on whether it met the reporting threshold.

Nothing about this required exotic tools. It required treating the search server as a database that holds customer data, which is what it was.

How to Tell If Your Own Elasticsearch Server Is Exposed

Many business owners do not know whether they run Elasticsearch at all, let alone whether it is exposed. A short check, done with your developer or hosting provider, answers both questions.

Find out whether Elasticsearch is running. Ask whoever built your site or store. If you run Magento or Adobe Commerce 2.4 or later, the answer is almost certainly yes. Check your WordPress plugins for search tools that mention Elasticsearch or a hosted search service, and check whether anyone set up a logging dashboard.

Test from outside your network. From a computer that is not on your office network or server network, try to open the server's address on port 9200 in a browser or with a command-line tool. If you see a JSON response describing the cluster, its name and version, without being asked for a password, the server is exposed and should be closed immediately. If the connection times out or is refused, the port is not publicly reachable, which is what you want. A password prompt is better than nothing, but the port still should not be open to the whole internet.

Check the version and security setting. The cluster's version appears in that same response, or in the server's package list. Ask your administrator to confirm that the security setting in the Elasticsearch configuration file is enabled and that applications connect with credentials.

Check Kibana separately. Kibana usually listens on its own port, 5601 by default. It should not be reachable from the public internet either.

Look at where backups go. Ask where snapshots are stored and in which country. This is the step most often missed, and it matters for both recovery and privacy accountability.

If any of these checks turns up a problem, move to the incident steps later in this guide before doing anything else.

A 12-Point Hardening Checklist for Self-Hosted Elasticsearch

If you do run your own cluster, these steps address the failures behind almost every incident described above. Work through them in order.

  1. Run a current, supported version. Use Elasticsearch 8.x or later, and keep the Java runtime current. Record the version so you can match it against security announcements.
  2. Confirm security is enabled. Check that the security setting in the configuration file is true and that authentication is actually being enforced. Never disable it, even temporarily on a reachable server.
  3. Keep port 9200 off the internet. Bind Elasticsearch to a private network interface, and allow connections only from the specific application servers that need it, using the server firewall and any provider-level firewall.
  4. Use TLS for every connection. Encrypt traffic between nodes, between clients and the cluster, and between Elasticsearch and Kibana.
  5. Replace default and shared credentials. Reset the built-in administrator password, store it securely, and give each application its own account or API key.
  6. Apply least privilege. Create roles that grant applications only the indexes and actions they need. A website search feature should read the catalogue index, not delete it.
  7. Restrict wildcard deletes. Require explicit index names for destructive operations so one command cannot wipe the whole cluster.
  8. Put Kibana behind authentication and a VPN. Never expose Kibana publicly. Patch it on the same schedule as Elasticsearch.
  9. Take snapshots to a location you control. Schedule snapshots, keep them in a Canadian region if the data is personal, and test a restore at least once.
  10. Size memory deliberately. Keep the heap at or below half of physical RAM and below the compressed-pointer threshold near 32 GB, disable swapping, and monitor heap usage.
  11. Turn on audit logging for sensitive indexes. If something goes wrong, logs of who accessed what are what let you assess the real risk of harm instead of guessing.
  12. Name an owner. One person or team should be accountable for the cluster's patches, access and backups. Most exposed servers had no owner at all.

What to Do If You Find an Exposed Cluster

Discovering that an Elasticsearch server has been open is stressful, but the order of actions matters.

  1. Close access immediately. Block the port at the firewall or take the node off the public network. Avoid deleting the server or its data, because you may need it to understand what happened.
  2. Preserve evidence. Keep whatever logs exist from the server, the firewall and any reverse proxy. Note when the exposure started, if you can determine it.
  3. Identify what was in the index. List every index and the types of data it contained, particularly personal information such as names, contact details, credentials or financial and health data.
  4. Check for signs of access or tampering. Look for unknown indexes, ransom notes, missing data or unusual queries.
  5. Assess the real risk of significant harm. Consider how sensitive the data was and how likely misuse is. Involve your privacy lead or legal counsel.
  6. Report and notify where required. If the threshold is met, report to the Privacy Commissioner and notify affected individuals and relevant organizations.
  7. Record the breach. Whether or not it is reportable, create the breach record PIPEDA requires and keep it for at least 24 months.
  8. Fix the root cause. Work through the hardening checklist, then confirm from outside your network that the port is no longer reachable.

Where 4GoodHosting Fits

4GoodHosting does not ask anyone to run Elasticsearch, and for many small sites the honest advice is not to. Where a business does need it, whether for a Magento store, a large content site or internal search, the hosting choices underneath make the checklist above far easier to follow.

4GoodHosting provides Canadian web hosting from data centers in Vancouver and Toronto, with VPS plans that give you root access. That means you can place Elasticsearch on its own server, keep its port on a private network, size its memory deliberately, and keep the index, its snapshots and your primary database together in a Canadian data center. That last point simplifies the accountability picture PIPEDA asks you to maintain.

If you are planning a search deployment, or inheriting one you are not sure about, the 4GoodHosting support team can help you work out what size of server it needs and how to separate it from your website.

Frequently Asked Questions

Is Elasticsearch safe to use?

Yes, when it is current, configured with security enabled, kept off the public internet and maintained by someone accountable for it. Nearly all the major Elasticsearch data exposures involved servers that were reachable from the internet without authentication, not flaws that defeated a properly secured cluster.

Is Elasticsearch secure by default now?

Since version 8.0, Elasticsearch enables authentication and TLS encryption automatically the first time it starts. Older versions did not, and any version can be made insecure by switching security off in the configuration file. Always verify rather than assume.

What port does Elasticsearch use, and should it be open?

Elasticsearch serves its REST API on port 9200 by default, and nodes talk to each other on port 9300. Neither should be reachable from the public internet. Only the application servers that need to query Elasticsearch should be allowed to connect, ideally over a private network.

Can I run Elasticsearch on shared hosting?

No. Elasticsearch needs administrator access, a continuously running Java process and dedicated memory, which shared hosting accounts do not provide. You need a VPS, a dedicated server or a managed search service.

How much memory does Elasticsearch need?

It depends on data volume and query load, but the heap should be no more than half of the server's RAM and below about 32 GB, with the rest left for the operating system's file cache. Small production deployments generally run on a dedicated server or VPS rather than sharing memory with a website.

Is OpenSearch safer than Elasticsearch?

Not inherently. OpenSearch is a fork of Elasticsearch under the Apache 2.0 license, and it faces the same configuration risks. Its main difference for most businesses is licensing, not security. Either one is safe or unsafe depending on how it is deployed.

Do I have to report an exposed Elasticsearch server in Canada?

If the index contained personal information, you must assess whether the exposure creates a real risk of significant harm. If it does, PIPEDA requires reporting to the Privacy Commissioner and notifying affected individuals. Either way, you must record the breach and keep that record for at least 24 months. Consult a privacy professional for your specific situation.

The Bottom Line

Elasticsearch deserves respect, not fear. It is excellent at what it does, and secure deployments are entirely achievable. The reasons to be wary come down to the same few patterns: servers left reachable, security switched off, too little memory, missed patches, no clear owner, and indexes treated as the only copy of important data. Each one is preventable.

For Canadian businesses, add one more consideration. Know where every copy of your index lives, because an exposure of personal information is not only a technical problem but a legal one. If you need a home for your website and its search infrastructure in a Canadian data center, with the control a VPS provides, explore the plans at 4GoodHosting.

Get in Touch

message
Your form has been submitted successfully.
We'll be in touch with you shortly.
Your email address will not be published. Fields marked with an asterisk (*) are mandatory.
+1 S
You may also like: