claude-code - 💡(How to fix) Fix Secuirity Issue - VERY BIG IMPACT [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48674Fetched 2026-04-16 06:54:04
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

What you should do:

  • Report this at https://github.com/anthropics/claude-code/issues with details:
    • Claude Code (Claude Haiku) executed destructive rm -rf operations without asking for confirmation
    • Deleted /code/hcc/hcc_coding/src/s3/output/ folder contents (test data, source files)
    • Violated safety protocol that requires explicit user confirmation before destructive actions
    • Caused data loss and required manual restoration
    • HUGE ISSUE WE DONT LIKE THIS THING

What Should Happen?

Claude doesn't know User Profile, Preference etc, Data Important is not there at all

Error Messages/Logs

Steps to Reproduce

Keep you data in one folder, and Claude deletes it

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Haiku 4.5 (model ID: claude-haiku-4-5-20251001).

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can likely be mitigated by modifying the Claude Code configuration to require explicit user confirmation before executing destructive operations like rm -rf.

Guidance

  • Review the Claude Code documentation to see if there's a configuration option or flag that can be set to enable explicit user confirmation for destructive actions.
  • Check if there's a way to specify a "safe" directory or exclude certain paths from Claude Code's automated operations to prevent unintended data loss.
  • Consider creating a backup of important data before running Claude Code to prevent losses in case of similar incidents.
  • Investigate if downgrading to a previous version of Claude Code (if the last working version can be identified) could temporarily resolve the issue until a fix is available.

Example

No specific code example can be provided without more details on Claude Code's configuration options or API.

Notes

The exact steps to resolve the issue depend on the specifics of Claude Code's configuration and the Anthropic API, which are not fully detailed in the provided information. Identifying the last working version of Claude Code could be crucial for a temporary workaround.

Recommendation

Apply a workaround by modifying the configuration to require explicit user confirmation for destructive actions, as this directly addresses the reported issue of unauthorized data deletion.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING