Skip to content

CSV export writes "null" or "undefined" for custom fields that have no value #23969

Closed

Description

@sebxt

What happens

When a login or secure note has a custom field without a value, the Bitwarden CSV export writes the literal text null or undefined as the value. A linked field (for example a field linked to Username) always has no value, so it is exported as Name: undefined. A text or hidden field with no value is exported as Name: null.

Importing that CSV back into Bitwarden turns these into text fields whose value is the string null or undefined.

What should happen

A field without a value should be exported as Name: (empty value), which the Bitwarden CSV importer already reads back as a field with no value.

Repro

  1. Create a login with a custom field of type Linked (linked to Username), and a text custom field left empty.
  2. Export the vault as .csv (web vault, browser, desktop or CLI bw export --format csv).
  3. The fields column contains Linked name: undefined and Empty name: null.

Root cause

BaseVaultExportService.buildCommonCipher in libs/tools/export-vault-core/src/services/base-vault-export.service.ts concatenates the value directly:

cipher.fields += (f.name || "") + ": " + f.value;

The name already falls back to an empty string, but the value does not, so null and undefined are stringified. This path is shared by the individual and organization CSV exports.

Activity

  1. bitwarden-bot commented on Oct 19, 2026

    @bitwarden-bot
    Collaborator

    Thank you for reporting this issue! We've added this to our internal tracking system.
    ID: PM-45327
    Link (for internal use): https://bitwarden.atlassian.net/browse/PM-45327

  2. cbbit commented on Oct 19, 2026

    @cbbit

    Hi there,

    This report has been escalated for further investigation. If you have more information that can help us, please add it below.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions