Unauthenticated remote uninstall in my own EDR agent, and the four other auth bugs that turned out to be the same bug
Description
A self-hosted EDR agent named Sentora had multiple critical authentication and authorization bugs, including an unauthenticated remote uninstall endpoint accessible to anyone on the LAN. The root cause was a common design flaw where the system trusted caller-supplied identity from various sources such as URL paths, headers, and request bodies without proper validation. Other issues included permissive authentication accepting any non-empty key, unauthenticated automation reporting that could fake containment success, LDAP injection in login, and missing authorization checks on multiple routes. The author discovered these issues through code review and automated tests, and has since fixed them on the main branch.
Reddit Discussion
Sentora is my own project, so this is a postmortem on my own code, not someone else's.
The agent shipped this:
@/app.post("/self_destruct") async def self_destruct(request: Request): threading.Thread(target=perform_destruction, daemon=True).start() return sanic_json({"status": "Destruction initiated"}) No auth. Listening on 0.0.0.0:9099. perform_destruction() ran rm -rf "$(pwd)". One unauthenticated POST from anywhere on the subnet uninstalled the EDR.
The four others:
Permissive auth on by default. A _is_permissive_auth() helper accepted any non-empty X-Agent-Key when a specific env var was unset. Nothing in the installer, the systemd unit, or the scheduled task ever set that var, so every default install accepted X-Agent-Key: a on /soar/execute, which runs commands.
Unauthenticated automation reporting. The server took a task_id from the request body and wrote a status. Enumerate the IDs, POST status: SUCCESS, and every queued containment action flips to done. The real agent stops seeing it as pending, so the isolation never runs, and the dashboard goes green. Not a bypass so much as a way to make the SOC watch a screen that says everything worked.
LDAP injection in login. search_filter = login_filter % username, with only a length check on the input.
Missing authorization on 8 routes. 143 routes, 103 with a decorator. Authentication was solid (opaque tokens, SHA-256 at rest, expiry enforced in SQL), which is exactly why I stopped looking at authorization. Any logged-in account could hit run_playbook, delete_soar_action, and test_ldap_connection, the last of which works as a credential oracle against the directory.
All five reduce to the same thing: I was taking the caller's word for who they were. Identity from the URL path, from a metadata.agent body field, from a header being non-empty, from X-Forwarded-For, and from being authenticated at all.
I only caught the route bugs by writing a test that walks the AST and asserts every route is either explicitly public or carries a check. It failed on the first run and named all eight. Reading code to spot a missing decorator does not work, because nothing is on the page to notice.
Full writeup with the fixes: https://d3vhex.github.io/2026-08-25-unauthenticated-remote-uninstall/
Repo (AGPL): https://github.com/d3vhex/Sentora
Everything above is fixed on main. The agent listener is still the most interesting surface if anyone wants to poke at it, and I would rather hear about it here than in an incident.
Links cited in this discussion
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Sentora, a self-hosted SIEM/SOAR/EDR platform, contained a critical unauthenticated remote uninstall endpoint listening on all interfaces, allowing any LAN user to uninstall the agent by sending a POST request to /self_destruct. Additional vulnerabilities stemmed from a permissive authentication mode that accepted any non-empty X-Agent-Key header due to unset environment variables, enabling unauthorized command execution. The server also allowed unauthenticated reporting of containment action statuses, enabling attackers to mark actions as successful and deceive SOC operators. An LDAP injection vulnerability existed due to unsafe string formatting of the login filter with minimal input validation. Furthermore, eight routes lacked proper authorization checks, allowing any logged-in user to perform sensitive actions such as running playbooks or testing LDAP connections. All these issues originated from a fundamental flaw: relying on caller-supplied identity without proper validation or authorization enforcement. The author implemented fixes including strict authentication on all endpoints, moving the uninstall endpoint behind a specific enrollment key, escaping LDAP filters, implementing per-user and per-IP lockouts, ignoring untrusted X-Forwarded-For headers, and introducing automated AST-based tests to ensure authorization coverage on all routes.
Potential Impact
The vulnerabilities allowed any user on the local network to uninstall the EDR agent remotely without authentication, effectively disabling endpoint protection. Attackers could execute arbitrary commands on endpoints due to permissive authentication. They could also manipulate containment action statuses to falsely indicate successful incident response, misleading security operators. LDAP injection could allow unauthorized directory queries or manipulation. Missing authorization on multiple routes permitted low-privileged users to perform sensitive administrative actions. Collectively, these flaws compromised the integrity, availability, and trustworthiness of the security platform, potentially exposing the network to undetected attacks and response failures.
Defensive Guidance
The author has fixed all identified issues on the main branch of the Sentora project. These fixes include enforcing authentication on every agent endpoint using secure methods, restricting the uninstall endpoint behind a dedicated enrollment key, escaping LDAP filter inputs, implementing per-user and per-IP lockout mechanisms, ignoring untrusted X-Forwarded-For headers, and removing reliance on caller-supplied identity fields for authorization decisions. Additionally, an automated AST-based test now ensures all routes have explicit authorization checks or are explicitly marked public, preventing regressions. Users of Sentora should update to the latest main branch to obtain these fixes. Since this is a self-hosted project, operators must apply the update and review their deployment configurations to ensure environment variables and secrets are properly set. Patch status is confirmed fixed on main. No known exploits in the wild have been reported.
Technical Details
- Source Type
- Subreddit
- netsec
- Reddit Score
- 0
- Discussion Level
- minimal
- Content Source
- reddit_link_post
- Post Type
- link
- Newsworthiness Assessment
- {"score":27,"reasons":["external_link","established_author","very_recent"],"isNewsworthy":true}
- Has External Source
- true
- Trusted Domain
- false
Threat ID: 6a8deedeacd9273b49a086e1
Added to database: 08/25/2026, 19:37:02 UTC
Last enriched: 09/10/2026, 17:39:16 UTC
Last updated: 10/03/2026, 20:57:34 UTC
Views: 78
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.