Blog

ColdBox Elixir v3 Security Update

Eric Peterson January 22, 2021

Spread the word

Eric Peterson

January 22, 2021

Spread the word


Share your thoughts

On January 12, 2021 we became aware of a security vulnerability in ColdBox Elixir. If an application using ColdBox Elixir bundled any code that contained references to process.env without explicitly setting the value using the webpack.ProvidePlugin then the outputed bundle would contain an object of all the environment variables. This would happen even if it was a vendor library that checked for process.env.* which is very common - many libraries check for process.env.NODE_ENV to enable optimizations or additional development logging. Since JavaScript is shipped to user's browsers, these environment variables are leaked and should be considered comprimised. Many of our own environment variables used in our CI processes were leaked, including SSH keys, S3 credentials, and database credentials. We recommend that you rotate all keys that are in the environment resposible for bundling your code with ColdBox Elixir.

ColdBox Elixir v3.1.7 and later were released to patch this vulnerability. We urge you to upgrade right away. Note that all referenced environment variables (via process.env) need to be explicitly declared in your Elixir config file, whether referenced by your own application code or third-party dependencies. We've added two features to make this transition easier.

First, automatic NODE_ENV environments. Elixir will provide a NODE_ENV value to your bundled code based on the current Elixir environment. If you desire to control this manually, setting a NODE_ENV in your environment will take precedence.

Second, a mix.env method. This method takes an array of environment keys to provide to your bundled code. If any of the keys are missing, your build will fail. Alternatively, you can provide an object with keys being the environment variable name and the value being a fallback value if the key is missing. This method passes directly to webpack.EnvironmentPlugin, so all the features listed for that plugin apply.

We deeply regret this security vulnerability and any additional work it has caused you. Please upgrade ColdBox Elixir and rotate your secrets straightaway.

Add Your Comment

Recent Entries

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management


Opting for in-house database management involves more than just a salary. Here are some often-overlooked costs associated with maintaining your own DBA team.



1. High Salaries and Benefits


Hiring skilled DBAs is expensive. According to industry reports, the average salary of a DBA in the U.S. can range from $85,000 to over $130,000 per year, depending on experience and expertise. When you add ...

Cristobal Escobar
Cristobal Escobar
November 20, 2024
5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

ColdFusion has long been a reliable platform for building web applications, but like any technology, it requires maintenance and modernization over time. Whether you're using Lucee or Adobe ColdFusion, it’s critical to recognize the signs that your application is no longer meeting today’s standards in performance, security, and scalability. Let’s explore five clear indicators that it’s time to modernize your ColdFusion application and how ColdFusion consulting can help breathe new life into y...

Cristobal Escobar
Cristobal Escobar
November 19, 2024
ColdBox Free Tip 5 - Building Named Routes with a Struct

ColdBox Free Tip 5 - Building Named Routes with a Struct

**Did you know ColdBox provides flexible ways to build routes using structs?** In this tip, we’ll cover how to use the `event.buildLink()` and `event.route()` methods for named routes, a feature that’s especially handy when working with dynamic URLs.

Maria Jose Herrera
Maria Jose Herrera
November 19, 2024