A Security Camera Shipped a GitHub Admin Token in Its Login Page

TL;DR
A Hanwha Vision camera shipped a GitHub admin token in its login page because a Vite build leaked process.env. How it happened and what to fix in your CI.
Last updated: July 25, 2026
A security researcher who goes by hhh downloaded firmware for a Hanwha Vision security camera to poke around and found something alarming: a GitHub personal access token with admin privileges to hundreds of repositories in the company's GitHub organization, baked directly into the camera's web UI. The story landed on the HN front page with 596 points and 191 comments - and the implications ripple far beyond one camera vendor.
What Happened#
The researcher started by downloading a firmware blob from Hanwha's public website. The initial extraction was straightforward - binwalk revealed a tarball with AI-related files and an encrypted fwimage.tgz. Following Matt Brown's existing writeup, the outer decryption passphrase was HTW plus the model number.
But inside that was another encrypted fwimage.tgz using a different scheme. Rather than manually reverse-engineering the decryption logic, hhh handed the fwupgrader binary to Claude Code and went to make dinner. The AI returned a full analysis: Hanwha had XOR-obfuscated the AES key and IV against a static key table in the binary, plus the openssl command fragments were XOR-obfuscated the same way. The key and IV turned out to be hardcoded and shared across the entire camera model line.
Once the rootfs was decrypted, running TruffleHog immediately found a GitHub token duplicated across roughly 30 files. The token had admin access to hundreds of the Hanwha GitHub organization's repositories.
The root cause was mundane but instructive. The camera's web UI is built with Vite, and a build-time variable was set to the entirety of process.env. Every environment variable from the CI job - including GITHUB_NPM_TOKEN with admin-scoped access - was written into the production JavaScript bundle served to anyone who accessed the camera admin interface.
The DoD Connection#
The CI environment also contained several IP addresses assigned to the US Department of Defense, including SWARM_MASTER_NFS_ADDRESS, OTEL_ELASTIC_URL, and CIMIP entries on the 55.101.211.0/24 range. The researcher speculated these could originate from Hanwha's sister companies - Hanwha Aerospace and Hanwha Defense USA - which manufacture the K9 Thunder self-propelled artillery, the SGR-A1 sentry robot, and other defense hardware. If the CI platform is shared across the conglomerate, defense-adjacent infrastructure details could end up in camera firmware by accident.
What HN Is Saying#
The HN discussion split into several threads, each worth examining.
Obfuscation is dead. IshKebab made the sharpest observation about methodology: "LLMs have truly killed obfuscation. It only worked previously by making things extremely tedious but AI doesn't care about that." The researcher used Claude Code to reverse-engineer the firmware decryption while making dinner - a workflow that would have taken a skilled reverse engineer hours of manual Ghidra work even two years ago. This is a recurring theme we have covered in our analysis of AI code attribution and forensics.
Common but not forgivable. Multiple commenters expressed resignation rather than surprise. dev_l1x_be wrote: "Not surprised, many of these vendors are doing crazy things, insane defaults, broken security, hardcoded values. Security is not a priority, I get it, but at the very least some baseline check would be nice." This echoes the sentiment we documented in our supply chain security guide - that basic credential hygiene is still the exception, not the rule.
Network segmentation is the only defense. Several commenters pointed out that the real lesson is architectural. tehlike: "A rule of thumb, put your cameras on a separate VLAN and never give that VLAN internet access." Kim_Bruning echoed: "Never let a cheap networked security camera touch the actual internet." asveikau noted that analog cameras connected to an NVR avoid this entire class of risk.
The DoD angle drew the most attention. grommz: "The US Department of War IP addresses baked into the firmware is the bigger story here." aizk agreed: "I feel this should be making headlines!" The researcher was careful to mark this section as speculation, suggesting the IPs could come from a shared CI platform at parent company level rather than any direct defense contract for the camera division.
Why This Matters#
This story combines three failure modes that keep showing up in security incidents.
First, CI environment leakage. Setting a Vite variable to process.env means every secret in the CI runner's environment gets serialized into production assets. This is not a Hanwha-specific bug - it is a pattern that shows up whenever build pipelines mix secrets with frontend assets carelessly. We wrote about the broader pattern of supply chain trust boundaries in AI development, and this is a textbook example.
Second, the firmware analysis workflow has changed. The researcher used an AI coding agent to reverse-engineer a proprietary binary decryption scheme in minutes. This is both a defense capability and an attack vector. Security researchers can find vulnerabilities faster, but so can adversaries. We explored this dynamic in our guide to securing AI coding agents.
Third, disclosure worked correctly here. The researcher reported the token to Hanwha's security email and received a response within 12 hours confirming the token was revoked. That is the ideal outcome in an industry where vendors often ignore or dispute researcher reports for months.
The broader lesson is that IoT and embedded device security is not improving fast enough. A camera's admin UI should never contain a GitHub token with admin access to hundreds of repos. A CI environment should never leak into production builds. And organizations that build both defense hardware and security cameras should not share a CI platform without strict tenant isolation.
FAQ#
How did a GitHub token end up in a security camera's login page?#
The camera's web UI is built with Vite, and a build-time variable was set to the entirety of process.env. Every environment variable in the CI job, including a GITHUB_NPM_TOKEN with admin-scoped access, was written into the production JavaScript bundle served by the camera's admin interface.
How did the researcher decrypt the Hanwha firmware?#
The outer layer used a passphrase of HTW plus the model number, following Matt Brown's earlier writeup. For the inner layer, hhh handed the fwupgrader binary to Claude Code, which found that the AES key and IV were XOR-obfuscated against a static key table and hardcoded across the model line. TruffleHog then found the token in roughly 30 files of the decrypted rootfs.
Was the leaked GitHub token revoked?#
Yes. The researcher reported it to Hanwha's security email and received a response within 12 hours confirming the token was revoked.
How should you protect networked security cameras?#
HN commenters converged on network segmentation: put cameras on a separate VLAN and never give that VLAN internet access. Others noted that analog cameras connected to an NVR avoid this entire class of risk.
Sources#
- My Security Camera Shipped a GitHub Admin Token in Its Login Page - Original blog post by hhh. Published 2026-07-24.
- HN Discussion - 191 comments, 596 points. Accessed 2026-07-25.
- Matt Brown's Hanwha Firmware Decryption Writeup - Prior research referenced in the post.
- Hanwha Vision Wikipedia - Company background and defense subsidiary information.
Continue Reading#
- Cloudflare Page Shield ML Caught 4 Storefront Malware Campaigns Static Scanners Missed - why behavior-based detection caught what signature scanners did not
- Ray CVE-2025-62593: Botnet Beat the Patch, CISA Gives Feds 3 Days - another case of exposed infrastructure exploited before the fix landed
- NPM Supply Chain and Trust Boundaries for AI Agents - How CI/CD credential hygiene intersects with agent supply chain risk
- Securing AI Coding Agents - Practical checklist for keeping agent workflows from leaking credentials
- AI Code Attribution Needs Defect Forensics - Why AI-assisted reverse engineering changes vulnerability discovery velocity
- Agent Config Files Are Executable Supply Chain - When configuration becomes code, credential hygiene gets harder
- Miasma Supply Chain Attack on AI Developers - A broader look at supply chain threats in the AI development ecosystem
Get the next deep dive like this in your inbox
One email a week on Security and the rest of the AI dev stack. Free.
Read next
LiteLLM 1.107.0 Compromised: Check, Clean and Rotate
LiteLLM 1.107.0 on PyPI shipped a credential stealer and a backdoor for under two hours on October 21. How to check if you ran it, what to clean first, and what to rotate.
8 min readarrayref 0.3.10 Ran a Remote Payload at Build Time
arrayref 0.3.10 was compromised to pull in a proc-macro1 typosquat whose build script ran a remote binary. What happened and why coding agents walk into it.
8 min readGitHub Malware Advisories Now Cover Eight Package Ecosystems
GitHub malware advisories now cover eight package ecosystems, adding PyPI, Maven, Go, crates.io and more to npm by ingesting OpenSSF malicious-packages data.
6 min readNew here? Start with
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.





