CVE-2023-51763: Activeadmin ActiveAdmin CSV Injection Leading To Vulnerability

MODERATE
Advisory Identifier: GHSA-xhvv-3jww-c487
CVSS 5.2
CWE-1236
Published
Advisory Summary

CVE-2023-51763 is a MODERATE (CVSS 5.2) activeadmin csv injection leading to vulnerability (CWE-1236: Improper Neutralization of Formula Elements in a CSV File) affecting Activeadmin libraries in the RubyGems ecosystem. The issue involves activeadmin csv injection leading to sensitive information disclosure. Remediation is available by upgrading affected packages to version 3.2.0.

CVE-2023-51763 at a Glance

CVE Identifier CVE-2023-51763
GHSA Identifier GHSA-xhvv-3jww-c487
Severity MODERATE
CVSS v3.1 Base Score 5.2
CWE Classification CWE-1236: Improper Neutralization of Formula Elements in a CSV File
Affected Product Activeadmin
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-51763

To remediate this vulnerability, upgrade all affected Activeadmin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

activeadmin fixed: 3.2.0
Upgrade activeadmin to 3.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for activeadmin

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-51763, inspect your project dependencies for Activeadmin:

inspect dependencies for activeadmin

Analyze the terminal output to locate any version of Activeadmin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1236: Improper Neutralization of Formula Elements in a CSV File, where the product saves user-provided information into a comma-separated value (csv) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product. In Activeadmin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact In ActiveAdmin versions prior to 3.2.0, maliciously crafted spreadsheet formulas could be uploaded as part of admin data that, when exported to a CSV file and the imported to a spreadsheet program like libreoffice, could lead to remote code execution and private data exfiltration. The attacker would need privileges to upload data to the same ActiveAdmin application as the victim, and would need the victim to possibly ignore security warnings from their spreadsheet program. ### Patches Versions 3.2.0 and above fixed the problem by escaping any data starting with `=` and other characters used by spreadsheet programs. ### Workarounds Only turn on formula evaluation in spreadsheet programs when importing CSV after explicitly reviewing the file. ### References https://owasp.org/www-community/attacks/CSV_Injection https://github.com/activeadmin/activeadmin/pull/8167

CVE-2023-51763 Affected Activeadmin Versions

1 component(s)
Fixed Versions:
3.2.0
Product / Package Ecosystem Affected Versions Fixed Version
activeadmin
RubyGems
< 3.2.0
3.2.0

References

Frequently Asked Questions

What is CVE-2023-51763?
CVE-2023-51763 is a security vulnerability in Activeadmin involving ActiveAdmin CSV Injection leading to sensitive information disclosure under CWE-1236: Improper Neutralization of Formula Elements in a CSV File.
Which Activeadmin versions are affected?
Affected versions include releases prior to 3.2.0 across affected packages: activeadmin.
What version fixes CVE-2023-51763?
Upgrading to 3.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is activeadmin affected?
Yes, activeadmin is affected in releases prior to 3.2.0. Upgrade your dependency to 3.2.0 or later.
What is the CVSS score of CVE-2023-51763?
CVE-2023-51763 has a CVSS v3.1 base score of 5.2 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2023-51763?
CVE-2023-51763 is classified under CWE-1236: Improper Neutralization of Formula Elements in a CSV File (The product saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product.).
How can I check RubyGems dependencies for CVE-2023-51763?
Run the dependency tree command: 'inspect dependencies for activeadmin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xhvv-3jww-c487",
  "modified" : "2023-12-28T18:45:30Z",
  "published" : "2023-12-28T18:45:30Z",
  "aliases" : [ "CVE-2023-51763" ],
  "summary" : "ActiveAdmin CSV Injection leading to sensitive information disclosure",
  "details" : "### Impact\n\nIn ActiveAdmin versions prior to 3.2.0, maliciously crafted spreadsheet formulas could be uploaded as part of admin data that, when exported to a CSV file and the imported to a spreadsheet program like libreoffice, could lead to remote code execution and private data exfiltration.\n\nThe attacker would need privileges to upload data to the same ActiveAdmin application as the victim, and would need the victim to possibly ignore security warnings from their spreadsheet program.\n\n### Patches\n\nVersions 3.2.0 and above fixed the problem by escaping any data starting with `=` and other characters used by spreadsheet programs.\n\n### Workarounds\n\nOnly turn on formula evaluation in spreadsheet programs when importing CSV after explicitly reviewing the file.  \n\n### References\n\nhttps://owasp.org/www-community/attacks/CSV_Injection\nhttps://github.com/activeadmin/activeadmin/pull/8167",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "activeadmin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/activeadmin/activeadmin/security/advisories/GHSA-xhvv-3jww-c487"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-51763"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/activeadmin/activeadmin/pull/8167"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/activeadmin/activeadmin/commit/7af735cf657c73734fca1900cd6a5adac4ee706e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/activeadmin/activeadmin"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/activeadmin/activeadmin/releases/tag/v3.2.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activeadmin/CVE-2023-51763.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1236" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-28T18:45:30Z",
    "nvd_published_at" : null
  }
}