Skip to content

CLI: Manual JSON construction in 6 locations (format! injection risk) #981

Closed

Description

@ajianaz

Problem

crates/uteke-cli/src/commands/doc.rs lines 63, 200, 386, 410 and mod.rs 278, 322 — JSON output constructed via format!() string interpolation. If document slugs/titles contain quotes or backslashes, JSON output is corrupted.

Fix

Use serde_json::json!() or serde_json::to_string() for all JSON output.

Severity: LOW (CLI output formatting, user-controlled input)

Activity

  1. added
    bug
    scope:cli
    on Aug 10, 2026
  2. ajianaz commented on Aug 10, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #984 (merged to develop)

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

    bugscope:cli

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions