Skip to content

Archive

Cybersecurity

535 articles
Cybersecurity 06 Sep 2026 10 min read

Turn Security Requirements Into Invariants

Security requirements often begin as broad statements: “users must not read other users’ records,” “disabled accounts must not create new sessions,” or “a refund must require approval.” These statements describe the desired outcome, but they do not yet tell a developer where the rule must hold or what code should make it true. That gap matters. A rule enforced in one screen can be bypassed by another API path. A check performed before a state change can become stale before the write completes. A background worker may operate under different assumptions from the request that queued its job. The result is not necessarily a missing security feature; it is often a security property that was never made precise enough to enforce consistently.

Cybersecurity 06 Sep 2026 9 min read

Treat Request Hosts as Untrusted Input

Web applications often need to know their own public hostname. A framework may expose it as request.host, a reverse proxy may forward it in a header, and application code may use it to build an absolute URL. That is convenient, but it can quietly turn request-controlled data into a security decision. If an application accepts an arbitrary request host and later places that value into a password-reset link, redirect, cache entry, or routing decision, an attacker may be able to make trusted application output point at an unintended host. The exact consequence depends on where the value is used, but the underlying mistake is the same: treating a routing identifier supplied with a request as if it were trusted configuration.

Cybersecurity 06 Sep 2026 10 min read

Treat CORS as a Browser Read Permission

A browser application often needs to call an API on another origin. The first time this fails, Cross-Origin Resource Sharing (CORS) can look like a networking obstacle: the request reached the server, the server returned data, yet JavaScript cannot read the response. That view leads to a dangerous fix—making the CORS policy broad until the error disappears. CORS is better understood as a browser-enforced read permission. Your server uses HTTP response headers to tell a browser which other origins may expose a response to their JavaScript. If a sensitive API grants that permission too broadly, code running on an unintended website may be able to read data in a user’s browser context. If the policy is too narrow, legitimate frontends stop working.

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 12 min read

Separate Public Errors from Diagnostic Details

An application fails while processing a request. The easiest implementation is often to return the exception message to the caller. That feels helpful during development because the response explains exactly what went wrong. In production, the same detail can expose information that the caller did not previously know: filesystem paths, database structure, dependency names, internal service addresses, object identifiers, configuration values, or fragments of sensitive input. A stack trace can reveal even more about how the application is assembled.

Cybersecurity 06 Sep 2026 11 min read

Separate Human and Service Identities

A developer needs a background job to read from an internal API. The fastest solution may be to reuse the developer’s own account, save its credential in the job, and move on. That shortcut quietly joins two different security problems. A human account is designed around a person’s login, employment, recovery, and interactive authentication. A service identity is used by software that runs without a person present. When one identity is forced to serve both roles, permissions become harder to limit, credentials are harder to rotate, and logs can no longer clearly tell whether an action came from a person or an automated workload.

Cybersecurity 06 Sep 2026 9 min read

Rotate Encryption Keys Without Losing Access to Data

Encrypting stored data creates a second problem that is easy to overlook: the application must keep the right decryption key available for as long as the protected data still needs to be read. If an application replaces an encryption key and immediately deletes the old one, existing ciphertext may become permanently unreadable. If it never replaces keys, one long-lived key can accumulate more data and more operational exposure than intended. A practical design needs to support both change and continuity.

Cybersecurity 06 Sep 2026 9 min read

Rotate API Credentials Without Breaking Services

Long-lived API credentials create an awkward security trade-off. Keeping one credential forever avoids deployment work, but extends the useful lifetime of any copy that is exposed. Replacing it abruptly reduces that lifetime, but can also break every client that still uses the old value. The practical solution is not simply to “rotate more often.” It is to design the authentication system so a credential can be introduced, adopted, verified, and retired without requiring one perfectly synchronized change.

Cybersecurity 06 Sep 2026 11 min read

Review Access Before Privileges Become Permanent

Access control can be correct on the day a permission is granted and still become risky later. A developer changes teams but keeps access to an old production project. A contractor finishes an engagement while a group membership remains active. A service account stops using a privileged operation, but its role is never reduced. None of these cases requires a broken authorization check. The system may enforce every permission exactly as configured. The problem is that the configured access no longer matches the current need.

Cybersecurity 06 Sep 2026 10 min read

Require Reauthentication Before Sensitive Actions

A user can remain signed in for hours or days, which is useful for ordinary work. The same convenience becomes risky when that old session is enough to change a password, add a new authenticator, reveal a recovery secret, or perform another action with lasting security impact. The problem is simple: a valid session proves that authentication happened earlier; it does not prove that the legitimate user is still in control now. A session may be open on an unattended device or may have been copied by an attacker. If every account change trusts the session equally, possession of that session can become enough to take over the account permanently.

Cybersecurity 06 Sep 2026 11 min read

Rate-Limit Login Attempts by Account and Source

A login endpoint may verify passwords correctly and still give an attacker too many chances to guess them. If failed attempts can be repeated quickly, weak or reused passwords become easier to test through the same interface legitimate users use. A common response is to add a rate limit. The difficult part is choosing what the limit follows. Limiting only an IP address misses distributed attempts from many sources. Limiting only an account lets one source spread attempts across many accounts. Combining the IP address and account into one key looks stricter, but creates a fresh allowance for every pair.

Cybersecurity 06 Sep 2026 10 min read

Notify Users About Security-Sensitive Account Changes

A sensitive account change can succeed even when the application has reasonable preventive controls. An attacker may have a valid stolen session, a user may approve a fraudulent authentication prompt, or a support process may make the wrong change. If the application silently accepts the result, the legitimate user may not discover the problem until the attacker has had time to strengthen control of the account. A security notification gives the user an independent signal that an important change occurred. It does not authorize the change and should not be treated as proof that the change was legitimate. Its job is different: shorten the time between an unauthorized change and the moment the user can recognize and respond to it.

Cybersecurity 06 Sep 2026 10 min read

Normalize Before Making Security Decisions

A security check can inspect the right data and still reach the wrong decision if another component changes that data afterward. A path may be validated before path resolution removes .. segments. A percent-encoded value may pass a character check and then gain different characters when a later layer decodes it. Two names that look different to one component may be treated as equivalent by another. The consequence is a representation mismatch: the security decision is made about one form of a value, while the sensitive operation uses another. An attacker does not need to defeat the policy itself if they can make the validator and the consumer disagree about what the input means.

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 9 min read

Do Not Use Security Questions for Account Recovery

A login system can use a strong password and multi-factor authentication, then quietly weaken the whole account through one recovery question: “What was the name of your first school?” If answering that question is enough to reset the password or replace an authentication factor, the answer is effectively another way to authenticate. An attacker does not need to defeat the stronger login path if the recovery path accepts information that can be guessed, researched, reused, or learned from another breach.

Cybersecurity 06 Sep 2026 12 min read

Design Session Revocation for Real Incidents

A user changes a compromised password, an administrator disables an account, or an incident responder chooses “sign out all devices.” The application confirms the action. Yet a browser or stolen session token that was already authenticated continues to work. That gap matters because changing a password and ending an authenticated session are different operations. A password is usually checked when a session is created. Once the session exists, later requests may rely only on the session credential. If the system has no way to withdraw that credential’s authority, fixing the original login secret does not necessarily end access that was established earlier.

Cybersecurity 06 Sep 2026 10 min read

Design Recovery Codes as Real Authenticators

Recovery codes are often presented as a convenience feature: save these codes somewhere, then use one if you lose access to your normal authenticator. That description can hide their real security role. A recovery code may be enough to regain control of an account, so anyone who obtains a valid code may gain the same recovery path as the legitimate user. The practical consequence is simple: a recovery code is an authenticator, not a harmless backup string. Its generation, storage, verification, use, replacement, and revocation all belong inside the authentication threat model.

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 06 Sep 2026 10 min read

Consume One-Time Tokens Atomically

A password-reset link may be labelled “single use” while still being usable twice. The problem is often not token randomness or expiration. It is a race between two requests that both verify the token before either request marks it as used. That matters because temporary tokens frequently authorize sensitive actions: resetting a password, verifying an email address, accepting an invitation, or completing account recovery. If the application promises one-time use, concurrent requests should not be able to turn that promise into two successful authorizations.

Cybersecurity 06 Sep 2026 9 min read

Compare Secret Values with Constant-Time Functions

A verifier often ends with a simple question: does a value derived from this request match the value the system expects? That question appears when checking message authentication codes, signed-request authenticators, reset-token digests, and other security-sensitive values. Using an ordinary string or byte comparison can introduce a subtle problem. Some comparison routines stop as soon as they find the first difference. Their work can therefore depend on how much of the input matches. If an attacker can make many measurements under sufficiently stable conditions, that timing difference may reveal information about a secret-dependent value.

Cybersecurity 06 Sep 2026 11 min read

Bound Work Before Processing Untrusted Input

An input does not need to be malicious code to hurt a service. It only needs to make the service spend far more memory, CPU time, storage, or concurrency than the sender spent creating the request. A parser may accept deeply nested data. A compressed upload may expand far beyond its transfer size. A search endpoint may allow a query that is valid but unusually expensive. If enough work begins before the application applies a limit, a small amount of incoming traffic can consume resources needed by legitimate users.

Cybersecurity 05 Sep 2026 11 min read

Verify Build Provenance Before Trusting Artifacts

A release artifact can have the expected filename, version, and download location without being the artifact your release process was supposed to produce. A compromised publishing account, an unexpected build path, or a mistake in release automation can put different bytes in front of users while everything around those bytes still looks familiar. Checking an artifact’s hash helps answer whether the bytes changed relative to a known hash. It does not, by itself, answer where that hash came from or whether those bytes were built from the intended source by an approved build process.

Cybersecurity 05 Sep 2026 11 min read

Verify Artifacts Before Running Them

Downloading software is often treated as the end of a trust decision: the file came from the expected page, so the next step is to run it. That shortcut is risky. A release archive, installer, container image, or build tool can be corrupted in transit or storage, replaced at a distribution point, or fetched from an unexpected source while keeping a plausible filename. Running the wrong bytes can turn a distribution failure into code execution inside a developer workstation, build system, or production environment. The defensive goal is therefore not merely to obtain an artifact. It is to establish that the bytes you received are the bytes an accepted publisher intended you to use.