flawopen.com/Directory/Reference
Security Reference Guides
Use these developer references to check security assumptions in frameworks, ORMs, authentication flows, serverless applications, and AI agent execution. Each guide links its explanation and remediation to its technical details.
- Claude Code MemoryTrap: AI Memory Poisoning — flawopen.com
Cisco’s MemoryTrap disclosure: how untrusted repository content reached persistent Claude Code memory, the v2.1.50 fix, and defenses.
- AI Agent Sandboxing: Containers, gVisor & MicroVMs
Compare container, gVisor, and microVM isolation for AI agents, including boundaries and network controls.
- AI Agent Tool Scoping: Least Privilege & Auth
Prevent excessive agency in AI agents with narrow tools, user-scoped authorization, and least privilege.
- AI PR Bots: Prevent Prompt Injection SSRF — flawopen.com
How untrusted pull-request text can influence AI tools, where SSRF risk begins, and how to constrain bot permissions and network access.
- Android addJavascriptInterface Security Risks
Learn how Android WebView bridges expose native methods to every frame, when XSS can cross into app capabilities, and how to isolate untrusted pages.
- Angular XSS Protection: Safe Defaults and Bypass APIs
Angular escapes interpolation and sanitizes HTML and URL bindings. Learn where bypassSecurityTrust* disables protection and how to audit XSS sinks.
- Content-Type Sniffing XSS: MIME Types and nosniff
Learn how MIME sniffing can turn uploaded content into a browser document, what nosniff does, and how to serve files safely.
- Is strncpy() safer than strcpy()?
In C, strncpy() is less risky than strcpy(), but may omit the null terminator. Learn when snprintf or strlcpy can help—and what to check.
- CSP vs. Output Escaping: Do You Need Both?
Output encoding prevents XSS in context; CSP limits some impact if a gap remains. Learn how to layer both controls without relying on CSP alone.
- CSRF Tokens for GET Requests: When Are They Needed?
Safe GET requests should not change state. Learn when CSRF tokens belong on unsafe methods and how to contain legacy state-changing GET endpoints.
- CWE vs. CVE: What's the Difference?
CWE vs. CVE: What's the Difference?: CWE is the category — a type of bug, like "SQL Injection" (CWE-89). CVE is the instance — one specific, documented occ
- Is React's dangerouslySetInnerHTML Safe?
React escapes JSX text, but dangerouslySetInnerHTML parses HTML. Learn how to review this XSS sink and safely render rich text.
- Dependency Confusion: Risks and Defenses
Learn how package-source ambiguity can introduce an unintended dependency, and how registry policy, lockfiles, and CI controls reduce risk.
- Django ORM SQL Injection: Safe Patterns and Pitfalls
Django QuerySets parameterize values, but raw SQL and dynamic query structure need care. See safe parameter binding and review rules.
- Docker Socket Exposure: Risks and Defenses
Exposing a Docker daemon socket can grant daemon-level authority. Learn the limits, capability risks, and safer container settings.
- Doctrine ORM SQL Injection: Safe Queries and Pitfalls
Bind DQL and SQL values with Doctrine parameters. Learn where QueryBuilder expressions remain injectable and how to allow-list dynamic sorting.
- Is DOMPurify Enough for Safe innerHTML?
DOMPurify protects rich HTML at the right sink. Learn its context limits, post-sanitization risks, Trusted Types, and production checks.
- .NET BinaryFormatter Security: Risks and Migration
Microsoft says BinaryFormatter cannot be secured. Learn the deserialization risk, .NET 9 behavior, safer replacements, and migration steps.
- Is .NET XmlReader safe from XXE?
XmlReader forbids DTDs by default. See .NET Framework 4.5.2 resolver changes, legacy API differences, and safe XML parsing.
- EF Core FromSqlRaw: Safe Parameterized SQL
Use FromSqlRaw with separate parameters, not concatenated input. Learn FromSqlInterpolated, EF Core version differences, and safe dynamic SQL.
- exec() vs execFile() in Node.js: What's the Difference?
exec() vs execFile() in Node.js: What's the Difference?: exec() takes one string and runs it through a shell — shell features like pipes and wildcards work
- FastAPI SQL Injection: What Pydantic Does and Doesn’t Stop
FastAPI validates request data, but SQL safety depends on query construction. Learn SQLAlchemy parameter binding and safe dynamic identifiers.
- Node.js fetch() SSRF: Safe URL Fetching
Server-side fetch() can reach destinations chosen by user input. Learn fixed destination maps, redirect controls, DNS safeguards, and egress limits.
- FreeMarker & Velocity SSTI: User Template Safety
FreeMarker and Velocity SSTI: control template source, restrict exposed Java objects, and isolate rendering to reduce server-side risk.
- GitHub Actions Script Injection: Safe Workflow Inputs
GitHub context values can become shell code in run. Learn safe env handling, token permissions, and pull_request_target risks.
- GORM Raw SQL: Prevent SQL Injection in Go
Use GORM Raw with bound parameters. Learn why values bind safely, SQL identifiers need allowlists, and query-builder input needs care.
- Is Escaping Quotes Enough to Prevent SQL Injection?
No. Parameterized queries separate data from SQL; escaping is database-specific and fragile. Use allow-lists when identifiers cannot be bound.
- Is Using an ORM Enough to Prevent SQL Injection?
Is Using an ORM Enough to Prevent SQL Injection?: For its standard query API, yes. Every mainstream ORM also ships a raw-SQL escape hatch, and those carry
- Java XXE: Is DocumentBuilderFactory Secure by Default?
JDK XML parsers limit some attacks, but external access is not disabled by default. Learn safe DocumentBuilderFactory settings and provider caveats.
- Java ObjectInputStream Security: Safer Deserialization
Untrusted Java serialization can trigger gadget behavior in readObject(). Learn when ObjectInputFilter helps and how to secure legacy streams.
- Java Runtime.exec() and Command Injection: What Changes?
Runtime.exec(String) does not start a shell, but unsafe input can still alter arguments. Use ProcessBuilder arrays and validate each value.
- Node.js ReDoS: Regex Risks and CVE-2026-83606
See how catastrophic regex backtracking blocks Node.js, what CVE-2026-83606 changed, and how to bound inputs and dependencies.
- Is Jinja2's render_template_string() safe?
Use a literal Jinja template and pass user data as context. Learn why autoescape does not stop SSTI and how CVE-2024-56201 differs.
- Does JSON.parse() cause prototype pollution?
JSON.parse() does not pollute prototypes. Learn how unsafe merges, path setters, and attacker-controlled keys can create the real risk.
- Is JSON.parse() safer than eval()?
See why JSON.parse() treats input as data, how eval() can execute it, and what the reviver callback means for trust.
- JWT in localStorage vs. HttpOnly Cookies: Which Is Safer? — flawopen.com
Architectural comparison of JWT in localStorage vs. HttpOnly SameSite cookies: XSS token theft, CSRF trade-offs, and recommended auth architectures.
- Is Knex.js Safe from SQL Injection?
Knex binds query values safely. Learn how to use knex.raw() bindings and allowlist dynamic SQL identifiers.
- Is lodash.merge() safe from prototype pollution?
Lodash prototype-pollution fixes vary by method and release. Check the affected ranges, current patched version, and safe object handling.
- Is Markdown Rendering Safe from XSS?
Markdown is not automatically safe for HTML output. Learn when raw HTML passes through and how to sanitize it safely.
- Mass Assignment: Risks and Safe Field Allowlists
Mass assignment lets request data set fields the caller should not control. Learn safe field allowlists, framework examples, and authorization checks.
- MCP Security: Tool Boundaries & Data Exposure | FlawOpen
Understand how MCP host, client, and server trust boundaries can expose data, and how to constrain local tools, permissions, and user consent.
- MyBatis ${} vs #{}: Prevent SQL Injection
MyBatis #{} binds values with JDBC; ${} inserts raw SQL text. Learn safe value binding and allowlisted dynamic identifiers.
- MySQLi vs PDO: Secure Prepared Statements
MySQLi and PDO can both prevent SQL injection with prepared statements. Compare binding, driver support, and safe query patterns.
- Newtonsoft.Json TypeNameHandling: Safe Configuration?
Json.NET TypeNameHandling reads CLR names from $type. Keep it None for untrusted JSON; otherwise validate types with a strict binder.
- Next.js Server Actions CSRF: Origin and Proxy Safety
Learn how Next.js Server Actions check Origin, where proxy and allowedOrigins trust can fail, and how to authorize every action safely.
- Serverless State Bleed: Keep User Data Request-Scoped
Learn how reused serverless runtimes can expose stale user data, and how to isolate authentication and tenant state per request.
- Is NHibernate Safe from SQL Injection?
NHibernate HQL parameters separate values from query syntax. Learn where string construction and dynamic identifiers still need review.
- Node.js child_process.exec() Command Injection Risk
Node.js exec() uses a shell. Learn when untrusted input becomes command injection and how execFile() plus validation changes the execution path.
- MongoDB NoSQL Injection: Safe Query Filters & Fixes — FlawOpen
Learn how unvalidated MongoDB query input changes filter logic, how to validate types and build safe filters, and how to test the fix.
- Why Is String Formatting Dangerous for Numeric IDs?
Why Is String Formatting Dangerous for Numeric IDs?: The risk was never about the value's real-world meaning — it's about the fact that the query is built
- Is Object.assign() safe from prototype pollution?
Is Object.assign() safe from prototype pollution? Yes for shallow copies — it never triggers the __proto__ setter. The risk appears in deep merges built on top of it.
- Is os.system() Always a Command Injection Risk?
Is os.system() Always a Command Injection Risk?: It's risky whenever any part of the command string includes untrusted input — os.system() always runs its
- What Is a Parameterized Query?
What Is a Parameterized Query?: A parameterized query is like filling out a form with labeled blanks instead of handwriting a whole letter. The database ge
- Is path.join() Enough to Prevent Path Traversal?
Is path.join() Enough to Prevent Path Traversal?: No — a common misconception. path.join() normalizes path segments, but it doesn't stop .. from walking ou
- Is PHP's include() safe with user input?
Is PHP include() with user input safe? No — it executes whatever it loads, turning file inclusion into code execution. Why LFI is as severe as RFI, and how to fix it.
- Is PHP's == safe for comparing hashes?
Is PHP's == safe for comparing passwords and hashes? No — loose comparison type-juggles strings to numbers, letting magic hashes and array tricks bypass checks. Use === or hash_equals().
- Is PHP's unserialize() safe on user input?
Is PHP's unserialize() safe on user input? No — it instantiates arbitrary classes and triggers magic methods, enabling POP chain attacks. Use json_decode() instead.
- Is Prisma $queryRaw Safe from SQL Injection?
Prisma parameterizes tagged-template values. Learn when raw query methods are safe and why SQL identifiers need allowlists.
- What is prototype pollution?
What is prototype pollution? A JavaScript-specific vulnerability class where writing to __proto__ modifies every object in the runtime. Explained with examples and fixes.
- Is Python's os.path.join() Safe from Path Traversal?
Is Python's os.path.join() Safe from Path Traversal?: No, and there's a second Python-specific trap: if the second argument is an absolute path, os.path.jo
- Is Python's pickle.load() Safe on Untrusted Data?
Is Python's pickle.load() Safe on Untrusted Data?: No — and this isn't a subtle edge case. Python's own documentation states plainly that unpickling data f
- Is Python's xml.etree safe from XXE?
Is Python's xml.etree safe from XXE? It does not resolve external entities, so classic file-read XXE fails — but entity-expansion DoS and lxml's different defaults still matter. Use defusedxml.
- Is Rails where() String Interpolation Safe?
Interpolating request data into Rails where() can cause SQL injection. Use hash conditions or bound placeholders for data.
- What is ReDoS (catastrophic backtracking)?
What is ReDoS and catastrophic backtracking? How a short input can make a backtracking regex engine run for exponential time, and which patterns to look for.
- Is Ruby's YAML.load safe on untrusted input?
Is Ruby's YAML.load safe? Since Ruby 3.1 it defaults to safe behaviour, but older versions instantiate arbitrary objects. YAML.unsafe_load is never safe on untrusted input.
- Is Rust's unsafe block still memory safe?
Is Rust's unsafe block still memory safe? No — unsafe suspends the compiler's checks, and unsound unsafe code makes safe callers vulnerable too. What soundness actually requires.
- Does SameSite=Strict Replace CSRF Tokens?
Does SameSite=Strict Replace CSRF Tokens?: It closes most of the gap for modern browsers, but it's not a complete substitute — it depends entirely on cooki
- AI Agent Tool Security: Least Privilege and Isolation
Secure AI agent tools with user-scoped authorization, approval for high-impact actions, and isolated execution. Understand sandbox and egress limits.
- Is Sequelize query() Safe from SQL Injection?
Sequelize raw queries need separate parameters. Learn the difference between replacements, bind values, and SQL identifiers.
- Is SQLAlchemy text() Safe from SQL Injection?
SQLAlchemy text() accepts raw SQL; bind values through execute(). Learn why interpolation and dynamic identifiers need review.
- Does sqlx's Compile-Time Checking Prevent SQL Injection?
Does sqlx's Compile-Time Checking Prevent SQL Injection?: It validates that a parameterized query's shape matches your real database schema — it doesn't re
- SSRF and Cloud Metadata: Credential Risks and Defenses
How SSRF can reach cloud metadata, when credentials may be exposed, and how provider controls, least privilege, and egress rules reduce risk.
- What is server-side template injection?
What is server-side template injection (SSTI)? When user input becomes part of the template rather than the data, the template engine's expression language becomes an interpreter for the attacker.
- Are Stored Procedures Immune to SQL Injection?
Are Stored Procedures Immune to SQL Injection?: No — a common misconception. A stored procedure protects you only if it uses parameter binding internally.
- Is Python's subprocess.run(shell=True) Safe?
Is Python's subprocess.run(shell=True) Safe?: Not if any part of the command string includes untrusted input. shell=True runs the command through an actual
- Is Svelte Safe from XSS by Default?
Svelte escapes ordinary text expressions. Learn why {@html} requires trusted or sanitized HTML, how to find its use, and what to review.
- Is SVG Upload an XSS Risk?
Is SVG Upload an XSS Risk?: Yes. SVG is an XML-based format that can contain embedded <script> tags and event-handler attributes — treating an SVG up
- Is TypeORM QueryBuilder Safe from SQL Injection?
TypeORM binds QueryBuilder parameters. Learn why interpolated conditions, raw SQL, and dynamic identifiers still need review.
- Vue v-html XSS Risk and Safe Rendering
Vue escapes {{ }} text by default, but v-html renders raw HTML. Learn the XSS boundary, safe rich-text handling, and how to audit .vue files.
- Is WKWebView loadHTMLString Safe for Untrusted Content?
Is WKWebView loadHTMLString Safe for Untrusted Content?: No, not by itself — it renders exactly the HTML string it's given, script included. It's safe only
- Reflected vs. Stored vs. DOM-Based XSS
Reflected vs. Stored vs. DOM-Based XSS: All three are the same underlying bug — unescaped untrusted content reaching the page — but they differ in where th
- What Is a Zip Slip Vulnerability?
What Is a Zip Slip Vulnerability?: A zip file's internal file list can include entries named things like ../../etc/cron.d/evil. If the code extracting the
- Cosign GHSA-fx35-mq7g-6g98: Bundle Verification Bypass
How legacy Cosign bundles bypassed keyless identity checks, which releases fix it, and how to harden blob verification in CI.