---
title: "AI Strikes Back: Using an LLM to write COBOL"
url: https://daily.dev/posts/ai-strikes-back-using-an-llm-to-write-cobol-6d1aer2nw
source_url: https://marmelab.com/blog/2026/04/08/cobol-ai-strikes-back.html
type: article
source: "marmelab"
published: 2026-04-08T16:09:35.291Z
updated: 2026-04-08T16:09:58.422Z
tags: ["github", "webassembly", "ai-coding"]
reading_time: 7
upvotes: 18
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Strikes Back: Using an LLM to write COBOL

**[marmelab](https://daily.dev/sources/Marmelab)** · 7 min read · 18 upvotes · 1 comments

## Summary

A developer used GitHub Copilot to build a browser-based COBOL IDE with zero prior COBOL experience, and it worked impressively well. However, reading the generated code revealed a critical remote code execution vulnerability: user-submitted COBOL was compiled and run directly on the server with no sandboxing. Copilot never flagged the security issue unprompted, but identified it clearly when explicitly asked. Three remediation approaches are discussed — Docker container isolation, syscall filtering, and compiling COBOL to WebAssembly for client-side execution. The key takeaway is that AI coding tools build what you describe, not what is safe to deploy; the judgment to ask the right security questions still requires a developer in the loop.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://marmelab.com/blog/2026/04/08/cobol-ai-strikes-back.html>

## Community discussion

Top comments from developers on daily.dev.

**@lucas39** · 0 upvotes

> COBOL is still used today in critical businesses, mainly for its reliability rather than its practicality or development speed, so it makes no sense to incorporate AI into the development cycle. It’s complete nonsense.

## Similar posts on daily.dev

- [How GitHub Copilot and AI agents are saving legacy systems](https://daily.dev/posts/how-github-copilot-and-ai-agents-are-saving-legacy-systems-mkxnxzegy) · GitHub Blog · 4 upvotes · 1 comments
- [AI Wars Ep. 3: The Return of the Developer](https://daily.dev/posts/ai-wars-ep-3-the-return-of-the-developer-vqojhscc5) · marmelab · 48 upvotes · 2 comments
- [How AI helps break the cost barrier to COBOL modernization](https://daily.dev/posts/how-ai-helps-break-the-cost-barrier-to-cobol-modernization-h7oqac1ou) · Claude · 2 upvotes · 0 comments
- [Ask HN: COBOL devs, how are AI coding affecting your work?](https://daily.dev/posts/ask-hn-cobol-devs-how-are-ai-coding-affecting-your-work--uk2rkumbt) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#webassembly](https://daily.dev/tags/webassembly), [#ai-coding](https://daily.dev/tags/ai-coding)

[View this post on daily.dev](https://daily.dev/posts/ai-strikes-back-using-an-llm-to-write-cobol-6d1aer2nw)
