Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› Read/Write Primitive
Threats, Abuse & Incident Response

Read/Write Primitive

← Back to Glossary
By NHI Mgmt Group Updated October 29, 2026 Domain: Threats, Abuse & Incident Response

A read/write primitive is an exploitation capability that lets an attacker read from or write to memory or another target object with controlled parameters. It is a building block in memory corruption attacks because it can expose secrets, alter pointers or change execution flow.

How a Read/Write Primitive Works

A read/write primitive is a low-level exploitation capability that gives an attacker controlled access to memory or another object, usually by specifying where to read or write and how much data to move. It is powerful because it turns a bug into direct influence over program state.

In practice, the primitive may be partial, such as reading arbitrary addresses but writing only through limited sizes or formats, or writing only to nearby locations. Even constrained variants are valuable because they can often be combined with other corruption steps to reach a more reliable exploit.

Why It Is So Valuable to an Attacker

The main reason this primitive matters is that confidentiality and integrity both fail at once. A read primitive can reveal pointers, secrets, canaries, session material, or object layouts, while a write primitive can alter those same structures and change the program’s future behaviour.

That combination often converts a crash-only defect into a controllable compromise path. Once an attacker can inspect memory and then change it, they can usually defeat protections that depend on hiding values, preserving object structure, or keeping control data immutable.

Because of that, a read/write primitive is often a milestone in an exploit chain rather than the end goal itself. It is the bridge between initial memory corruption and more decisive outcomes such as code execution, privilege abuse, or process takeover.

What It Usually Means for Exploit Development

Exploit developers use the primitive to map the target, confirm offsets, and locate sensitive runtime data. A read primitive helps identify the right addresses and object relationships; a write primitive helps redirect control flow, patch flags, or overwrite function pointers and metadata.

The practical challenge is reliability. Many primitives are not fully arbitrary, so attackers spend effort shaping input, compensating for alignment limits, or chaining the primitive with an information leak. The more precise the primitive, the easier it is to build a stable exploit around it.

In modern environments, these primitives are especially dangerous because they can undermine mitigation assumptions. For example, an information leak can expose randomised addresses, and a targeted write can then use that information to reach a chosen object or control field.

Defensive Meaning and Security Consequences

For defenders, the appearance of a read/write primitive indicates that a memory safety boundary has already failed in a meaningful way. It is not just a bug class, but evidence that attacker influence has crossed from fault injection into state manipulation.

That has direct consequences for triage and severity. A defect that creates a primitive deserves more attention than one that only crashes the process, because the former can expose secrets, alter security decisions, and create persistent footholds inside a long-lived service.

The safest response is to treat the underlying memory corruption issue as the primary defect and to assume related secrets or process state may already be exposed. The primitive is often a sign that adjacent objects, credentials, tokens, or pointers should be considered compromised until proven otherwise.

Risk and Threat Considerations

A read/write primitive materially raises the risk that a memory corruption issue becomes a full compromise path. The same capability that leaks secrets can also rewrite control data, so defenders should assume both information exposure and integrity loss are possible once the primitive exists.

Failure mechanism: The attacker uses controlled reads to discover addresses and sensitive values, then uses controlled writes to modify pointers, flags, or execution-related data until the target process behaves in attacker-chosen ways.

Impact: This can lead to secret disclosure, denial of service, privilege escalation inside the process, and in many cases code execution or durable compromise of the service instance.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5, OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1055 — Process InjectionMemory corruption primitives often enable code or process control through injected or altered execution state.
T1003 — OS Credential DumpingRead primitives can expose secrets, tokens, or credentials resident in memory.
Recommendation — Map observed memory manipulation to T1055 and hunt for process tampering and execution redirection. Search for memory disclosure paths and rotate any credentials or tokens exposed by the compromise.
NIST SP 800-53 Rev 5SI-16 — Memory ProtectionThis primitive arises when memory protection controls fail to prevent unsafe reads and writes.
Recommendation — Strengthen memory protection controls to reduce arbitrary read and write opportunities.
OWASP ASVSV15 — Secure Coding and ArchitectureMemory safety weaknesses are addressed through secure coding and architecture requirements.
Recommendation — Apply secure coding practices that eliminate memory corruption paths before they become primitives.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareUnsafe runtime configurations and weak hardening can increase the impact of memory corruption.
Recommendation — Harden affected software and runtime settings to reduce exploitable memory corruption exposure.

Practitioner Guidance

Why practitioners should care: A read/write primitive is a strong indicator that the bug has crossed the threshold from theoretical memory corruption to actionable exploitation. Teams should classify it as an exploitation enabler, not as a routine correctness issue.

What to watch for: Pay close attention when crash analysis, fuzzing, or exploit proofing shows even narrow read or write control, because partial primitives are often enough to leak state and pivot into a stronger exploit. The right question is whether the primitive can be composed, not whether it is fully general.

Practitioner takeaway: If a defect can expose memory and then alter it, assume the exploit surface is already large enough to justify urgent remediation and compromise review.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 29, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org