Skip to content

hardening: prevent CSV formula injection and malformed CSV output in exports #256

@somethingwithproof

Description

@somethingwithproof

Summary

CSV export writes attacker-controlled fields directly into quoted CSV without CSV-safe escaping or formula neutralization.

Evidence

functions.php export blocks around:

  • 800-807
  • 827-836

Values are concatenated directly, including host/message/log text.

Risk

  • Spreadsheet formula execution when cells begin with =, +, -, @
  • Broken CSV format for embedded quotes/newlines

Expected fix

  • Use fputcsv() (or equivalent robust escaping)
  • Prefix dangerous leading formula characters with '
  • Preserve existing export columns/format semantics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions