Skip to content

Archive

Secure Design

26 articles
Cybersecurity 14 Sep 2026 6 min read

Deserialization Can Turn Data Into Program Behavior

A serialized object can look like ordinary application data while carrying enough structure to influence which classes are instantiated, which fields receive values, and which runtime hooks execute during reconstruction. That difference matters whenever an application accepts object graphs from a browser, message queue, cache, file, or another service and treats decoding as a passive parsing operation. The dangerous cases are not defined by serialization itself. JSON decoded into a fixed record type is not equivalent to a native object stream that can name arbitrary runtime classes. The security boundary appears when attacker-controlled input can select behavior-rich types, trigger lifecycle callbacks, or assemble existing code paths into an unintended computation.

Cybersecurity 13 Sep 2026 7 min read

Unsafe Deserialization Turns Data Into Program Behavior

A serialized value can look inert on the wire and become active the moment an application reconstructs it. The dangerous transition is easy to miss because the input may resemble ordinary state: fields, type names, references, collection entries, or compact binary records. Yet some serialization systems restore far more than plain data. They can select classes, invoke constructors or callbacks, rebuild object graphs, and activate framework behavior during or after decoding.

Cybersecurity 13 Sep 2026 8 min read

Deserialization Can Turn Data Into Execution

Deserialization Can Turn Data Into Execution A serialized object can look like inert application state right up to the moment a runtime reconstructs it. At that boundary, a compact sequence of bytes may stop behaving like ordinary data and begin selecting classes, invoking reconstruction hooks, resolving references, allocating complex object graphs, or activating framework machinery. That distinction matters whenever serialized state crosses a trust boundary. The risky property is not simply that an attacker can submit malformed input. Many native serialization systems preserve enough information about program objects that decoding carries semantics far beyond parsing JSON fields into a plain record. In the wrong context, deserialization becomes a mechanism for asking the application to assemble behavior chosen partly by the input.

Cybersecurity 10 Sep 2026 9 min read

Require Independent Approval for High-Risk Administrative Actions

Some administrative actions are too consequential to depend on one account making one decision. An administrator might be compromised, might misunderstand the target, or might simply select the wrong option. If that one identity can immediately disable a critical control, grant powerful access, or approve a destructive change, ordinary authentication cannot distinguish a legitimate decision from a costly mistake. Independent approval changes that failure mode. One authorized person proposes the action, and a different authorized person must approve the same action before it can execute. The control is sometimes called two-person approval or a four-eyes rule. Its useful security property is narrower than those names suggest: a single administrator’s authority is insufficient for a defined class of high-risk operations.

Cybersecurity 10 Sep 2026 10 min read

Reject Replayed Sensitive Requests with Freshness and Uniqueness

A request can be authentic and still be unsafe to execute twice. Suppose a service accepts a correctly authenticated instruction to change a payout destination, approve a privileged action, or trigger another sensitive operation. If someone can capture that valid request and submit the same authenticated message again, checking its credentials or signature a second time may produce the same answer: the request is genuine. The server still needs to decide whether it is current and whether it has already been used.

Cybersecurity 10 Sep 2026 10 min read

Keep User-Controlled Redirects on Trusted Destinations

Login flows often need to remember where a user was going. A request arrives for /billing, the application sends the user to sign in, then redirects them back after authentication. The feature is useful, but it becomes an open redirect when an untrusted value can make the application send the browser to an arbitrary destination. That matters because the redirect begins on a domain the user already trusts. A crafted link can legitimately reach your application and then immediately send the browser somewhere you never intended. Redirect parameters can also cross security boundaries in authentication and authorization flows when code assumes that “after login” is automatically a trusted place.

Cybersecurity 10 Sep 2026 9 min read

Design Audit Logs That Remain Useful After Compromise

An application can record every error and still have little evidence when an account is abused. Ordinary operational logs answer questions such as “why did this request fail?” Security investigations need different facts: which identity changed an authentication factor, which administrator granted access, which object was affected, and whether the action succeeded. That is the job of an audit log: a durable record of security-relevant actions and decisions. A useful audit log helps investigators reconstruct events after an incident while limiting two risks of its own: attackers changing the evidence and sensitive data leaking through the log.

Cybersecurity 09 Sep 2026 8 min read

Treat Time as a Security Dependency

Security controls often depend on time without treating the clock itself as part of the control. A token may expire at a timestamp, a signed request may be accepted only for a short window, and investigators may reconstruct an incident by ordering events from several services. If those clocks are wrong, the security decision can be wrong too. A clock that jumps backward can extend a time-based window. Two servers with different wall clocks can disagree about whether the same credential is expired. Poorly synchronized log timestamps can make a correct sequence of events appear reversed.

Cybersecurity 09 Sep 2026 10 min read

Make Tenant Context Part of Every Authorization Decision

A multi-tenant application can have correct login logic and still expose one customer’s data to another. The failure often begins with an authorization check that asks only whether a user may access a resource, while forgetting to verify the tenant in whose context that access is being requested. A tenant is an isolated customer, organization, workspace, or similar security domain that shares an application with other tenants. Tenant isolation means actions intended for one tenant should not silently cross into another.

Cybersecurity 09 Sep 2026 8 min read

Make Authorization Policy Conflicts Explicit

Authorization becomes difficult when more than one rule applies to the same request. One policy may grant a developer access to a project while another restricts access to confidential records. If the system has no explicit rule for combining those policies, a small implementation detail can decide whether access is granted. That is a security problem because developers, administrators, and reviewers may believe different policies take precedence. A later refactor can then change effective access without anyone intending to change the security model.

Cybersecurity 09 Sep 2026 9 min read

Design User Identifiers to Resist Visual Spoofing

Two account identifiers can be different to software while looking almost identical to a person. That gap matters anywhere people use a displayed identifier to decide whom they are trusting: administrator consoles, collaboration tools, package registries, marketplaces, support systems, or internal approval workflows. If an application treats visual appearance as irrelevant, an attacker may be able to register an identifier that resembles a trusted account closely enough to mislead another user. The database still sees two distinct strings. The human may not.

Cybersecurity 08 Sep 2026 10 min read

Make Destructive Actions Recoverable Before They Become Permanent

A delete button can turn one stolen session, one excessive permission, or one operator mistake into permanent data loss. Authentication and authorization still matter, but they answer only whether a request is allowed now. They do not answer whether the effect should become irreversible immediately. For data whose loss would be costly, a useful defensive pattern is to separate logical deletion from permanent deletion. The first step removes the object from normal use without destroying the underlying recovery copy. Permanent deletion happens later, after a defined recovery window or a stronger authorization step.

Cybersecurity 07 Sep 2026 10 min read

Treat Signed URLs as Bearer Capabilities

A signed URL can make private content easy to share. Instead of requiring the recipient to authenticate to the storage service, an application creates a URL containing enough authorization information for the service to accept a specific request. That convenience changes the security model. Anyone who obtains a usable copy of the URL may be able to exercise the authority it carries. If the URL permits too much, remains valid too long, or is exposed through logs and messages, a small disclosure can become unintended access.

Cybersecurity 07 Sep 2026 8 min read

Make Protected Routes Private by Default

A team can have good authorization checks and still expose a new endpoint by forgetting to attach them. This failure is especially easy to introduce when routes are registered one at a time: most protected handlers use authentication or authorization middleware, but one new handler is added without it and becomes reachable under the framework’s default behavior. The consequence depends on what that route does. A missed guard can expose private data, allow a state-changing operation, or make an administrative function available to callers who should never reach it.

Cybersecurity 07 Sep 2026 9 min read

Fail Closed When Authorization Dependencies Are Unavailable

An application may have a correct authorization policy and still expose protected actions when the system that evaluates that policy is unavailable. The dangerous shortcut is to treat a timeout, network error, or missing policy result as permission so that the application can keep working. That changes an availability problem into an access-control problem. A temporary dependency failure can then let a requester perform an action that the application never established they were allowed to perform.

Cybersecurity 06 Sep 2026 9 min read

Serve User Uploads as Untrusted Content

Accepting a file is only half of an upload feature. The other half is deciding what happens when someone retrieves that file. A file that was harmless while sitting in object storage can become a security problem when a browser receives it from your application’s origin. If the response is interpreted as active content, the uploaded bytes may gain privileges that the uploader should never have had. Even files that are meant only for download can expose other users when authorization, response metadata, or storage boundaries are wrong.

Cybersecurity 06 Sep 2026 10 min read

Keep Sensitive Data Out of URLs

A URL is convenient because it is easy to copy, bookmark, route, log, and inspect. Those same properties make it a poor place for passwords, long-lived access tokens, recovery secrets, or other values that should remain confidential. The problem is not that HTTPS exposes the URL to everyone on the network. HTTPS protects the request in transit between endpoints under its security assumptions. The problem is what happens before and after transport: URLs routinely pass through browser history, application and proxy logging, monitoring systems, support messages, screenshots, and copied links. A secret placed in a URL can therefore reach systems and people that never needed the secret.

Cybersecurity 06 Sep 2026 10 min read

Isolate Untrusted File Processing

Applications often need to inspect files they did not create. A service may resize an uploaded image, extract text from a document, read archive metadata, generate a preview, or scan a media file. Each task requires complex code to interpret attacker-controlled bytes. Input validation helps reject files that do not meet your rules, but it cannot guarantee that every parser and library is free of defects. If a file processor has a vulnerability, a specially constructed file may trigger behavior beyond ordinary parsing. The consequence depends heavily on what authority that processor has: access to application secrets, writable storage, internal services, or other users’ data can turn a parser failure into a much larger incident.

Cybersecurity 06 Sep 2026 12 min read

Design Cryptography for Algorithm Change

Applications often keep encrypted records, signed objects, or authentication data for much longer than the code that first created them. During that lifetime, a cryptographic algorithm may be deprecated, a parameter may become too weak, a library may change, or an organization may need a different key-management design. The difficult part is usually not adding the new cryptographic operation. It is changing the system without making old data unreadable, silently accepting an unintended algorithm, or leaving legacy protection in place forever.

Cybersecurity 05 Sep 2026 11 min read

Fail Closed When Authorization Cannot Be Evaluated

An application may have correct authorization rules and still lose its security boundary when the component that evaluates those rules fails. A policy service can time out. A role lookup can return an error. Configuration can be unavailable. A programmer can catch the exception and continue because keeping the application online seems preferable to rejecting the request. If that fallback grants access, an availability problem has become an authorization bypass. The application is no longer saying, “this principal is allowed.” It is saying, “I could not determine whether this principal is allowed, so I will allow the action anyway.”

Cybersecurity 04 Sep 2026 11 min read

Treat Request Hostnames as Untrusted Input

A web application often needs to know which hostname a request targeted. That hostname helps route virtual hosts and can be useful when serving several domains. The security problem begins when the application treats the request hostname as if it were a trusted statement about its own public identity. If an unauthenticated client can influence that value, using it to build password-reset links, sign-in callbacks, canonical URLs, or other security-sensitive destinations can make the application generate URLs for a domain it does not control. Similar trust mistakes can also affect routing and caches.

Cybersecurity 04 Sep 2026 9 min read

Make Security-Sensitive State Changes Atomic

Security checks can be individually correct and still fail when two requests run at the same time. A request checks that a recovery code is unused, a withdrawal is within a limit, or an approval is still pending. Before it records the state change, another request performs the same check against the same old state. Both requests then proceed even though the rule was meant to allow only one. This is a race condition: correctness depends on the relative timing of concurrent operations. A common form is a time-of-check to time-of-use problem, often shortened to TOCTOU, where the fact established by a check can become false before the protected action uses it.

Cybersecurity 04 Sep 2026 11 min read

Keep Encryption Nonces Unique

Modern authenticated encryption can protect both the confidentiality and integrity of data, but some algorithms depend on a small operational rule that is easy to overlook: do not reuse a nonce with the same key. A nonce is a value supplied to a cryptographic operation for a particular invocation. The word comes from “number used once,” but a nonce is not necessarily secret and is not necessarily a simple counter. What matters is the requirement of the algorithm using it. For widely used authenticated-encryption schemes such as AES-GCM and ChaCha20-Poly1305, nonce reuse under the same key can invalidate important security guarantees.

Cybersecurity 04 Sep 2026 9 min read

Fail Closed Without Creating an Outage Bypass

An application may make access decisions with help from a policy service, identity provider, entitlement database, or another remote dependency. That design works until the dependency times out. At that moment, the application still has to answer a security question: should this request be allowed? A dangerous fallback is to treat “I could not check” as “allow.” A temporary outage can then become an authorization bypass. But denying every operation whenever any security-related dependency is unavailable can create unnecessary outages and may push teams toward unsafe emergency workarounds.