Skip to main content

CVE-2022-46155: CWE-522: Insufficiently Protected Credentials in Airtable airtable.js

Medium
Published: Tue Nov 29 2022 (11/29/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: Airtable
Product: airtable.js

Description

Airtable.js is the JavaScript client for Airtable. Prior to version 0.11.6, Airtable.js had a misconfigured build script in its source package. When the build script is run, it would bundle environment variables into the build target of a transpiled bundle. Specifically, the AIRTABLE_API_KEY and AIRTABLE_ENDPOINT_URL environment variables are inserted during Browserify builds due to being referenced in Airtable.js code. This only affects copies of Airtable.js built from its source, not those installed via npm or yarn. Airtable API keys set in users’ environments via the AIRTABLE_API_KEY environment variable may be bundled into local copies of Airtable.js source code if all of the following conditions are met: 1) the user has cloned the Airtable.js source onto their machine, 2) the user runs the `npm prepare` script, and 3) the user' has the AIRTABLE_API_KEY environment variable set. If these conditions are met, a user’s local build of Airtable.js would be modified to include the value of the AIRTABLE_API_KEY environment variable, which could then be accidentally shipped in the bundled code. Users who do not meet all three of these conditions are not impacted by this issue. Users should upgrade to Airtable.js version 0.11.6 or higher; or, as a workaround unset the AIRTABLE_API_KEY environment variable in their shell and/or remove it from your .bashrc, .zshrc, or other shell configuration files. Users should also regenerate any Airtable API keys they use, as the keysy may be present in bundled code.

AI-Powered Analysis

AILast updated: 06/22/2025, 13:20:35 UTC

Technical Analysis

CVE-2022-46155 is a vulnerability affecting versions of Airtable.js prior to 0.11.6. Airtable.js is the official JavaScript client library for Airtable, a popular cloud-based spreadsheet and database service. The vulnerability arises from a misconfiguration in the build process of the Airtable.js source package. Specifically, when users clone the Airtable.js repository and run the `npm prepare` script to build the library locally, environment variables such as AIRTABLE_API_KEY and AIRTABLE_ENDPOINT_URL are inadvertently embedded into the transpiled JavaScript bundle. This occurs because the build script references these environment variables during the Browserify bundling process, causing their values to be hardcoded into the output files. The key condition for exploitation is that the user must have the AIRTABLE_API_KEY environment variable set in their shell environment at build time. This means that if a developer or organization builds Airtable.js from source with their API key set, the key becomes part of the distributed or deployed code. This can lead to accidental leakage of sensitive credentials if the built code is shared publicly or with unauthorized parties. It is important to note that this issue does not affect users who install Airtable.js via standard package managers like npm or yarn, as those packages do not include the vulnerable build step. The vulnerability is classified under CWE-522 (Insufficiently Protected Credentials), highlighting that sensitive information is not adequately safeguarded during the build process. The recommended remediation is to upgrade to Airtable.js version 0.11.6 or later, where the build script has been corrected to avoid embedding environment variables. Alternatively, users can mitigate risk by unsetting the AIRTABLE_API_KEY environment variable before building and regenerating any potentially exposed API keys to prevent unauthorized access. There are no known exploits in the wild, but the risk of credential leakage through inadvertent code distribution remains significant for affected users.

Potential Impact

For European organizations using Airtable.js built from source, this vulnerability poses a risk of sensitive API keys being exposed unintentionally. Such exposure could allow attackers to access Airtable data repositories, potentially leading to unauthorized data disclosure, modification, or deletion. Given Airtable’s use in managing business-critical data, including customer information, project management data, and internal workflows, compromised API keys could disrupt operations and violate data protection regulations such as GDPR. The impact on confidentiality is high since API keys grant direct access to Airtable data. Integrity could also be affected if attackers modify records or configurations. Availability risks exist if attackers delete or corrupt data. Although exploitation requires specific build conditions, organizations with custom builds or internal development processes that clone and build Airtable.js from source are at risk. The vulnerability does not require remote exploitation or user interaction but depends on developer environment configuration, making it a supply chain and insider risk. European organizations with development teams that build open-source dependencies locally should be particularly cautious. The lack of known exploits reduces immediate threat but does not eliminate risk, especially in environments where code is shared or deployed without thorough review. Overall, the vulnerability could lead to data breaches, operational disruption, and regulatory non-compliance if API keys are leaked and abused.

Mitigation Recommendations

1. Upgrade all Airtable.js dependencies to version 0.11.6 or later to ensure the build process no longer embeds environment variables into the bundle. 2. Audit development and CI/CD pipelines to verify that Airtable.js is installed via npm or yarn rather than built from source, eliminating the vulnerable build step. 3. For teams that must build from source, ensure the AIRTABLE_API_KEY environment variable is unset or removed from shell configuration files (.bashrc, .zshrc, etc.) before running any build scripts. 4. Regenerate all Airtable API keys that may have been exposed in previously built bundles to invalidate compromised credentials. 5. Implement strict code review and artifact scanning processes to detect accidental inclusion of sensitive credentials in source code or build outputs. 6. Educate developers about the risks of embedding environment variables in builds and enforce secure environment management practices. 7. Use secrets management tools to inject API keys at runtime rather than build time, reducing the risk of credential leakage. 8. Monitor Airtable API usage logs for suspicious activity that could indicate compromised keys. These targeted steps go beyond generic advice by focusing on build environment hygiene, dependency management, and credential lifecycle controls specific to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-11-28T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9846c4522896dcbf4bd3

Added to database: 5/21/2025, 9:09:26 AM

Last enriched: 6/22/2025, 1:20:35 PM

Last updated: 7/29/2025, 5:54:35 PM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats