OpenXML Forensic Architecture: Metadata Exposure and Sanitization in Modern Word Documents
A comprehensive technical examination of the ISO/IEC 29500 Open Packaging Convention (OPC), Dublin Core schemas, tracking identifiers, and forensic data hygiene.
1. The Anatomy of an OpenXML (.docx) Package
Many users perceive a Microsoft Word .docx document as a single monolithic binary file. In reality, modern Office documents adhere to the Open Packaging Convention (OPC), an international standard (ISO/IEC 29500-2) based upon standard ZIP compression containers.
When a .docx package is unzipped, it reveals a standardized hierarchical directory structure:
_rels/.rels // Root relationship definitions
word/document.xml // Core paragraph and run typography
word/settings.xml // Document settings and RSID revision tracking
docProps/core.xml // Dublin Core metadata (Author, Modifiers, Dates)
docProps/app.xml // Application metrics (Company, Editing Time, Template)
docProps/custom.xml // Optional enterprise proprietary attributes
While word/document.xml contains the visible prose displayed on screen, the docProps/ directory quietly harvests detailed telemetry regarding the human operators and computing devices involved in the document's production.
2. Dublin Core Metadata and Extended Properties
Metadata stored within Word documents is bifurcated into two primary OpenXML schemas:
| XML Tag | Source Schema | Information Exposed | Privacy Risk Level |
|---|---|---|---|
| dc:creator | docProps/core.xml | Full name / username of original author | High (Leaks identity) |
| cp:lastModifiedBy | docProps/core.xml | Name of final user who saved the file | High (Leaks reviewer identity) |
| TotalTime | docProps/app.xml | Cumulative editing time in minutes | Medium (Billing dispute risk) |
| Company | docProps/app.xml | Corporate organization name from Office license | High (Exposes contractors) |
| Template | docProps/app.xml | Filename or internal path of base template (.dotx) | Medium (Exposes server paths) |
| cp:revision | docProps/core.xml | Sequential save counter (e.g. Revision 42) | Low to Medium |
3. Real-World Case Studies of Metadata Leaks
Inadvertent distribution of unscrubbed documents has triggered high-profile political and commercial controversies throughout the history of modern electronic communications:
- The 2003 UK Government "Dodgy Dossier": The British Prime Minister's office published a Word document on national security. Journalists extracted the revision history and author metadata, discovering that substantial sections were copied verbatim from a student academic thesis written years prior, with edits attributed to civil service press secretaries.
- Corporate Acquisition Leaks: During high-stakes merger negotiations, a financial advisory firm circulated a "confidential" term sheet. The
docProps/app.xmlmetadata listed an unannounced third-party private equity firm as the original template creator, exposing secret multi-party negotiations before the deal closed. - Legal Bill Discrepancies: In commercial litigation fee disputes, legal counsel submitted draft settlement agreements claiming over 80 billable hours of bespoke drafting. Opposing counsel inspected the
<TotalTime>element in the DOCX package, which reported exactly 18 minutes of editing time.
4. Algorithmic Mechanics: Pure In-Browser Package Parsing
Standard desktop utilities require installing resource-intensive software suites or running Python scripts with python-docx. 2ClickKit executes the entire forensic scrubbing pipeline inside the browser engine using asynchronous ZIP streaming and native DOM manipulation:
import JSZip from 'jszip';
async function scrubDocx(fileBuffer: ArrayBuffer): Promise<Blob> {
const zip = await JSZip.loadAsync(fileBuffer);
const parser = new DOMParser();
const serializer = new XMLSerializer();
// 1. Sanitize Dublin Core stream
const coreFile = zip.file('docProps/core.xml');
if (coreFile) {
const text = await coreFile.async('text');
const doc = parser.parseFromString(text, 'application/xml');
// Clear identifying tags
['dc:creator', 'cp:lastModifiedBy'].forEach(tag => {
const el = doc.getElementsByTagName(tag)[0];
if (el) el.textContent = '';
});
// Reset revision
const rev = doc.getElementsByTagName('cp:revision')[0];
if (rev) rev.textContent = '1';
zip.file('docProps/core.xml', serializer.serializeToString(doc));
}
// 2. Re-pack cleanly compressed OpenXML ZIP
return await zip.generateAsync({
type: 'blob',
compression: 'DEFLATE',
mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
});
} 5. Zero-Knowledge Browser Isolation and HIPAA Compliance
Uploading documents containing unredacted patient medical records, litigation exhibits, or corporate intellectual property to remote cloud conversion services introduces severe liability under the European Union General Data Protection Regulation (GDPR) and the U.S. Health Insurance Portability and Accountability Act (HIPAA).
2ClickKit establishes an absolute air-gap guarantee: all parsing, DOM queries, and ZIP serialization happen inside client memory. No telemetry or file chunks are ever uploaded across any network interface.