Close Menu
HitechubHitechub
    What's Hot
    Nature
    New Monkey Species Discovered in the Democratic Republic of Congo by Scientists
    AI
    OpenAI to Add Watermarks to ChatGPT Outputs by Default in the EU
    Space
    Webb Telescope Discovers Methane in Interstellar Comet 3I/ATLAS
    Important Pages:
    • About Us
    • Privacy Policy
    • Terms & Conditions
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    HitechubHitechub
    Saturday, December 5
    • Technology
      Canadian Social Media Stunt Angers Los Angeles Fire Department, Leads to ICE Arrest
      Nvidia Stock Falls as US Market Declines Amid Ongoing AI Concerns
      Chrome Will Stop Trusting Common HTTPS Certificates in March – Ars Technica
      Bitcoin Falls to 2-Year Low Amid AI Encryption Concerns
      Fake Meta Ads Manager App on App Store Stole Facebook Account
    • Science
      Scientists Discover Hidden Chemistry Laws That Could Make Fuel Cells More Affordable
      Northern Ireland Farmers Face Serious Impacts if New Regulations Are Not Approved
      Academic Locusts at Conferences: Are Attendees Listening to Lectures or Just Swarming the Lunch Tables?
      Large-Scale Study of 1.1 Million People Reveals How DNA Influences Personality Traits
      Post-Quantum Internet Security: Why an Urgent Upgrade Is Needed and What You Need to Know
    • Space
      NASA and Italy to Share Latest Updates on Lunar Base Plans
      European Space Agency Explores Independent Human Spaceflight Program
      Air-Breathing Engines Race to Reach Earth’s Lowest Orbit
      Jupiter’s Sun Photo: Capturing Jupiter’s Natural Beauty
      New Experiment Shows Tardigrades Can Survive Mars-Like Environments
    • AI
      California Customers Fed Up With Chatbots Can Request Human Agents Starting in 2027
      Tech Giants Agree on 10 Rules for AI Development After Meeting With King
      From Light Switch to Dimmer: NVIDIA’s Vladimir Troi and Warren Barclay on Grid-Tied Data Centers
      Building Two Complementary Modes of AI Work
      NVIDIA’s Gilad Shainer Explains How Networks Connect Server Racks into “One Computer”
    • Health
      Do You Need a Measles Booster? Experts Explain Which Adults Should Get One
      How AI Is Transforming the Pharmaceutical Industry from Within
      Whole-Grain Bread May Help Adults With Prediabetes Manage Blood Sugar, Study Finds
      Scientists Discover Hidden Bone Formation Switch That Could Help Fight Osteoporosis
      Global Inequalities in Clinical Trial Participation and Representation
    • Cybersecurity
      G.SKILL Website Hacked, Distributing Malware Through Software Downloads
      Hackers Spread Roblox-Themed Malware Through 820 YouTube Videos
      Vibe Hacking: How AI Lowers the Barrier for Modders and Cyberattackers
      Hackers Exploit Critical Veeam Vulnerability Patched in August
      Woolworths Data Breach Affects 14 Million Australians
    • Nature
      One of the World’s Largest Insects Makes a Surprising Comeback
      Eagles Hunting Human-Sized Baboons May Have Rewritten Human Evolutionary History
      Two Gorillas Create an Ingenious “Living Ladder” to Escape Through an Electric Fence
      Research Reveals Evolutionary Pathway from Reptile-Like Ancestor to Upright Mammal
      13 Million Years Ago, Giraffe-Like Camels With Tusks Roamed North America
    • Environment
      Super El Niño Peaks as Ominous 2027 Forecasts Emerge
      British Weather in 2026: How It Became One of the Most Unusual Years on Record
      Reed Timmer on 30 Years of Storm Chasing and His Plan to Study Violent Tornadoes in a “Flying Saucer”
      Unprecedented El Niño Intensifies Extreme Weather Conditions
      British Weather in 2026: How It Became One of the Most Unusual Years on Record
    • Archaeology
      Denisovans and Unknown Archaic Humans Coexisted in Southern China 100,000 Years Ago
      2,200-Year-Old “Evil” King Coin Featuring War Elephant Found in Israel, Revealing First Hanukkah Connection
      Ice Age European DNA Reveals Unexpected Siberian Links and Higher Neanderthal Ancestry Levels
      1,000-Year-Old Islamic-Era “Magic” Bowls Discovered in Israel Were Covered With Pseudo-Letters to Ward Off the Evil Eye
      Early Humans May Have Kept Keepsakes to Preserve Memories of Their Lives
    HitechubHitechub
    Home » AI » AI Coding Agent Hijacked Through a Malicious AGENTS.md File in the Downloads Folder
    AI

    AI Coding Agent Hijacked Through a Malicious AGENTS.md File in the Downloads Folder

    Share Facebook Twitter Pinterest WhatsApp
    AI Coding Agent Hijacked Through a Malicious AGENTS.md File in the Downloads Folder
    Share
    Facebook Twitter LinkedIn Pinterest WhatsApp

    Researchers at Forever Security have found that malicious AGENTS.md and similar instruction files can hijack AI coding agents when the files are placed in a user’s downloads folder. The researchers recreated the attack against OpenAI Codex and demonstrated related techniques against Claude Code, including installing malicious npm packages, executing code, leaking OAuth tokens and potentially taking over accounts—all through instructions supplied to the agents.

    Markdown files such as AGENTS.md are plain-text documents that provide project-specific guidance to AI coding agents, including which tools to use, how to run tests and which coding conventions to follow.

    Read also
    • How to Fix an AI Agent That Hijacked Your Company’s DNS Without Approving Changes
    • New Controversial Details Uncovered in Diabetes Ban: What You Need to Know

    How the attack works

    Forever Security, a company that monitors risks associated with AI agents and autonomous software, investigated an attempt to use an AGENTS.md file in a customer’s ~/Downloads folder to make an AI coding agent install a malicious npm package. The folder was also being used as the agent’s working directory.

    AI agents typically load relevant instruction files from their working directory and use them to guide their actions. Although Markdown files are not executable, their instructions can prompt an agent to run commands, install packages or change settings using the tools and permissions available to it.

    “There’s nothing here to patch OpenAI or Anthropic. The agents that follow AGENTS.md in the folder are doing exactly what they were built to do,” the researchers said.

    The researchers’ tests confirmed that attackers can use these files to manipulate OpenAI Codex and Claude Code into executing code or stealing credentials.

    They could not determine how the malicious instruction file reached the target’s ~/Downloads folder. However, they told BleepingComputer that merely visiting a malicious webpage could cause a file to be downloaded without further user interaction.

    “~/Downloads is special; it’s the one folder that the web can write to on its own,” Forever Security said in a report this week. “Web pages can silently download files named AGENTS.md to the Downloads folder.”

    To demonstrate the technique, the researchers created a proof-of-concept attack that attempts to place a file in the ~/Downloads folder without the user’s knowledge.

    When BleepingComputer tested the proof-of-concept page, it downloaded an AGENTS.md file containing the benign text “Sensitive Data Here” and “Line 2.”

    Many popular browsers, including Chrome, Edge and Firefox, save downloaded files to ~/Downloads by default without asking users to select a location each time. In BleepingComputer’s tests, browsers such as Brave prompted users to approve the download, which could alert them that a file was being saved. Chrome, Edge and Firefox also display download notifications by default.

    Once the file is in the downloads folder, the attack still requires the victim to launch an AI agent from that directory. The agent then loads the instruction file and processes its malicious content.

    Forever Security researcher Gal Weizman told BleepingComputer that this situation is common because people often use AI agents to organize folders and manipulate newly downloaded files.

    According to the company’s internal statistics, hundreds of customers run AI agents such as Claude Code, OpenAI Codex and Cursor CLI from their ~/Downloads folders. The researchers told BleepingComputer that Claude Code alone had started more than 1,300 sessions from that location.

    Tests demonstrate the risk

    The researchers reconstructed the attack chain against Codex using a benign payload that simply opened a calculator application. The test achieved a 90% success rate.

    In a separate test, they used a malicious CLAUDE.md file to redirect Claude Code’s API traffic to a server under their control. This exposed the agent’s OAuth token, allowing the server to impersonate the model and return tool calls that executed code in approximately 50% of the tests.

    How users can reduce the risk

    The researchers said the risk results from the intended behavior of both browsers and AI agents, making prevention and protection largely a user responsibility.

    Users should avoid setting ~/Downloads as the working directory for an AI coding agent, because the folder may contain untrusted files that the agent could interpret as instructions.

    OpenAI and Anthropic recommend running AI coding agents from the specific project directory being worked on. Starting the agent at the project’s root, rather than in the home directory or a broader parent directory, provides relevant context while limiting the files it can process.

    The working directory defines the agent’s default project context and, depending on the tool, can also help establish boundaries for filesystem access. Users should keep that area as small as possible and expand access only when necessary.

    Users should also review unfamiliar AGENTS.md, CLAUDE.md and similar instruction files before allowing an AI coding agent to follow them. Approval prompts and sandbox protections should remain enabled, and potentially untrusted code should be tested in an isolated environment before it is run on a primary system.


    Article image

    The overall prevention score can hide what happens after the initial access. If an attacker uses valid credentials, your defenses drop sharply.

    The Blue Report 2026 measures defense techniques by technology across 338 million simulations run in customer production environments.

    Get the report

    Source: www.bleepingcomputer.com

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp
    Previous ArticleMysterious Mushroom Reveals Hundreds of Tiny Human-Like Figures
    Next Article Astronomers May Have Discovered the First Exomoon Outside Our Solar System

    Related Posts

    AI

    California Customers Fed Up With Chatbots Can Request Human Agents Starting in 2027

    AI

    Tech Giants Agree on 10 Rules for AI Development After Meeting With King

    AI

    From Light Switch to Dimmer: NVIDIA’s Vladimir Troi and Warren Barclay on Grid-Tied Data Centers

    AI

    Building Two Complementary Modes of AI Work

    AI

    NVIDIA’s Gilad Shainer Explains How Networks Connect Server Racks into “One Computer”

    AI

    Nvidia CEO Jensen Huang Tells Senate Committee Chips Were Smuggled Into China

    Cybersecurity

    Device Code Phishing Campaign Places Malicious Devices in 305 Microsoft Entra ID Tenants

    AI

    NVIDIA’s Rory Kelleher: Healthcare Needs Purpose-Built AI “Super Agents” to Ease Staff Shortages

    Add A Comment
    Leave A Reply Cancel Reply

    Stay In Touch

    • Facebook
    • Twitter
    • Instagram

    Top Picks

    AI

    How NVIDIA GPUs Accelerate OpenAI’s GPT-6 Astra for Ultrafast AI Performance

    GPT-6 Astra Ultrafast Delivers Up to 8x Faster Token Generation on NVIDIA Blackwell GPUs GPT-6…

    3 Best USB Phone Chargers in 2026: Anker and DeWalt Compared

    AI Agent Security Risks: Hidden Vulnerabilities You May Not Notice

    Researchers Develop Full-Color Night Vision Goggles for Enhanced Low-Light Visibility

    NVIDIA cuDSS Now Generally Available to Accelerate Engineering and Scientific Simulations

    Most Popular

    Space

    Elon Musk and SpaceX After Texas’ Blue Wave: What Happens Next?

    Space

    Gemini North Telescope Captures Stunning Image of Merging Spiral Galaxies

    Categories

    • AI (869)
    • Archaeology (262)
    • Cybersecurity (726)
    • Environment (508)
    • Health (712)
    • Nature (545)
    • Science (896)
    • Space (1,100)
    • Technology (1,310)

    Our Picks

    Science

    Scientists Reach the Ultimate Quantum Limit for Surfaces

    Science

    China’s Remarkable Scientific Developments: Daily Briefing

    © 2026 Hitechub.
    • Home
    • About Us
    • Privacy Policy
    • Terms & Conditions

    Type above and press Enter to search. Press Esc to cancel.

    GDPR Cookie Banner

    We are using cookies to give you the best experience on our website.

    You can find out more about which cookies we are using or switch them off in .

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.