Security and privacy for your Instagram export
Processing a ZIP of your entire Instagram history comes with concrete threats. This is the engineering posture: local-first by default, hardening against ZIP bombs/path traversal, XSS and prototype pollution, worker isolation, and the opt-in sync tier's encryption - including the limits it does not remove.
Putting a ZIP of your entire Instagram history into an app raises an obvious question. What is on the other side of the transaction, and what does it want from you?
For most server products, the answer is uncomfortable. For this one, the honest answer has two parts. In local mode, the app never receives your archive, so there is no server holding it. When you turn on the optional server features, you are trusting a server to the degree described below. This post states that degree plainly, including the limits that remain even with encryption.
Security writing that only lists strengths is marketing. This one lists the limits too.
Security writing that only lists strengths is marketing. This one lists the limits too.
Local mode is the default and the only mode that runs without configuration. Everything — unzipping, parsing, format conversion, analysis, media previews — runs in your browser on your device, with no server component and no telemetry.
The export's own security and privacy datasets are read the same way: locally, field by field. This post inventories what the archive's security_and_login_information folder holds, and where a label is Meta's inference rather than a fact about you.1
Untrusted archives are hardened. ZIP bombs, path traversal, prototype pollution, malformed input and worker denial-of-service are all bounded.
The account layer and the profile-sync tier are strictly opt-in and gated by configuration. And the sync tier's encryption has a known, openly documented limit: a fully compromised server that is still running can act on a user who logs in. That limit is stated here, not hidden.2
- 3minlocal mode: the default posture, and how the app proves it.
- 5minthe export's security and privacy datasets, field by field, and their limits.
- 8minhostile-archive hardening: bombs, traversal, pollution, worker DoS.
- 11minthe optional account layer, the sync tier, encryption, and its limits.
Local mode is the default
Local mode is the default, and it is the only mode that runs without setup. Everything happens in your browser on your device: unzipping, parsing, format conversion, analysis and media previews.3
Three things follow from that.
- No server in the processing path. There is no server component that sees your archive.
- Untrusted archives are still handled carefully. ZIP bombs, path traversal, prototype pollution and worker denial-of-service are all bounded. Each is covered below.
- The server features are opt-in. The account layer and the sync tier stay off unless you configure them. And the sync tier's encryption has a known limit, stated here rather than hidden.2
The local guarantees
- Media never leaves your device. Photos, videos and audio stay on your machine.
- No third-party code runs in the page. A strict content security policy forbids inline and third-party scripts. Camera, microphone and location are blocked. The page cannot be framed by another site.
- You can watch it be true. The built-in Security → Live security verify page runs the parsing pipeline. It watches every outbound request, so you can see the absence of network calls instead of taking a sentence on faith.
There is no telemetry footnote to add. Local mode makes no measurement calls, and the site runs no analytics at all. The accurate claim is simply "no archive data leaves your device", and the verify page is how the local part is checked.
An untrusted archive is hostile input
An Instagram export is hostile input. It is a ZIP you did not write, and anyone can craft one. In local mode the attacker and the victim are the same person. The archive still has to fail safely instead of wedging your device or corrupting your data. The controls come from a documented threat model:3
- Screen before inflating. The app reads the archive's central directory without decompressing anything. That reveals each entry's declared sizes up front. So a 5 GB file named
photo.jpgis rejected before a byte is expanded, not after. Per-entry and total sizes are capped, and so is the compression ratio (above 2000:1 is refused,MAX_COMPRESSION_RATIO). Older code checked the size only after creating the file, which gave no bomb protection at all. - Screen the names too.
preScreenArchiveEntriesrejects path traversal, absolute and drive-letter paths, control characters, over-long names, case-insensitive duplicates and look-alike characters. It also caps the entry count, so the screen cannot become the attack it prevents. This check used to be dead code, called only by tests. It now runs insideextractArchive. - Allow cancellation. Extraction takes an
AbortSignaland checks it between batches.runWithDeadlineaborts work in flight when the overall time limit is hit, so a timeout actually stops a parse instead of leaving it running in the background. - Never do the work twice. If the worker dies, requests are rejected and the worker is terminated. The main-thread fallback runs only if the worker sent no message at all. Previously any silence replayed the whole extraction on the main thread, doubling peak memory for exactly the large archives that would notice.
- Bound media batches. A media batch has a total-size cap, checked before inflating in both the worker and the main-thread path. One batch cannot return several gigabytes in a single message.
- Bound local storage. At most 5 archives are kept, and the least recently used one is evicted with its caches. Re-importing an identical export is detected by fingerprint rather than duplicated. Media is namespaced per archive, which fixed a real bug where importing a second person's export could show the first person's photo.
The honest residual. These controls bound the damage of a hostile archive. They do not make a multi-hundred-gigabyte export streamable with bounded memory. That is tracked as explicit future work. This post says so rather than implying the ceiling does not exist.3
- Read the directoryno decompression yet.
- Screen sizescaps and a ratio limit.
- Screen the namestraversal and look-alikes.
- Extract with an aborta timeout really stops.
Parsing hardening
Where the archive becomes data, four classes of input are handled:3
- Prototype pollution. When untrusted objects are merged,
__proto__,constructorandprototypeare rejected. Ledger dictionaries are built prototype-less. Merge points useObject.definePropertyrather thanObject.assign, the exact spot that carries a hostile key. The personal-information post shows the same guard in its own parser. - XSS and HTML injection. HTML exports are parsed in controlled contexts. Rendered content is escaped and normalised, and text is repaired for encoding damage but never executed as code.
- Malformed input. JSON parse errors are caught per file. HTML parse failures are swallowed safely. Unknown shapes are ignored rather than crashing the worker.
- Resource limits. Large archives are processed in steps, with bounded recursion and per-file caps.
Runtime isolation
- Web Worker. Parsing runs in a Web Worker to keep the UI responsive and to isolate CPU-heavy work. Worker messages are bounded.
- Denial of service. Bounded queues, entry caps and time/size budgets keep a single pathological file from blocking the app indefinitely.
- Strict browser policy. A strict content policy runs in report-only mode. Violations are collected first-party, summarised and discarded. Nothing is persisted or forwarded, and there is no third-party error-reporting vendor. Enforcement is deliberately a later, separate step, once the reports are clean.
What the export's security and privacy section contains
An Instagram export ships a security_and_login_information folder and a spread of small datasets describing how the account was used and what the platform inferred about it. This app reads that material locally and models two families of it as types.1
The privacy surface is PrivacyData: archived sign-ins (each a LoginRecord of ip, userAgent, device, location, time, timeLabel), inferred interest and advertiser labels, topic and contact lists, and the history rows. The account-security surface is SecurityData: dated signup, logout, password, privacy and status records; one coarse last-known-location label; structured device records (name, os, deviceType, lastActive); and camera, secret-conversation, profile-activity and camera-effect records.45
Every list defaults to [], and the security object itself is optional so an older archive still loads. An empty list means the export did not carry that dataset. It never means the count was confirmed to be zero.5
What each field can and cannot tell you
A field is a row from a file, not a fact about you. This is the honest inventory. extractGeneric flattens a structure to its values and drops the per-row title, while extractAccountHistory keeps the field key as the title, so a profile change reads as what changed, not just its new value.1
| Field | What it is | What it is *not* |
|---|---|---|
| `ip` | the address string Meta recorded | never geolocated or resolved here |
| `userAgent` | a browser/OS string | not parsed into hardware |
| `device` | Meta's device label, when present | blank for HTML exports |
| `location` | Meta's free-text place label | not a coordinate, and not verified |
| `time` / `timeLabel` | a parsed instant vs the raw string | `0` when nothing parses |
| `adInterests`, `advertisers` | interest and advertiser labels | not verified, and not your own words |
| `videosWatched`, `linksVisited` | rows with a value, an href and a time | a count of rows, not of attention |
| `accountHistory` | profile edits, value plus key plus time | not a verdict about the change |
| `devices` | structured name/os/type/last-active records | not a live session list |
| `lastKnownLocation` | one coarse place label | not a GPS fix[^stypes] |
The honest limits of this section
- The labels are Meta's, not ground truth. An ad interest is an inference, not a statement you made. No IP-to-city lookup and no cross-account enrichment happens here.
- A row is a value and a time.
videosWatchedproves a row exists, not that you watched closely, and HTML exports are thinner still — the device string, for one, is only filled by the JSON path. The login surface is likewise a recent window, not your whole life.13
The optional account layer
The account layer is the product's optional server feature. It is off by default and switched on only by the operator. If it is off, the feature disables itself and the app stays fully local. When it is on:3
- It stores as little as it can: a username, an encrypted email address and a one-way password hash. It never stores archive text or media.
- Sessions live in hardened cookies. Sign-in and password reset are rate-limited, and every state-changing request is checked against a strict same-origin rule.
- Password reset never reveals whether an address exists, so the flow cannot be used to list accounts.
The individual primitives are deliberately not catalogued in marketing copy. What matters is the shape: a small surface that is easy to audit, that stores as little as it can, and never the archive itself.
The sync tier and its limits
The profile-sync tier is a separate, opt-in surface. It is not part of local mode and not part of the account snapshot. It activates only after explicit sync consent, and the default stays fully local. Its rules are strict:
- Ordinary sync never stores media. The separate premium media option can persist
content-addressed encrypted chunks, but only with its own explicit consent.
- Messages are part of every synced pack under consent taken once at signup. There
is no per-field or per-upload checkbox; local mode never sends anything.
- Retention is instant erase plus a 30-day grace, the same lifecycle as the account layer.
- Uploads go straight to storage over a single short-lived, freshness-gated link, so the bytes never pass through an application handler.
- Signed-up users' data is handled by a deliberately small set of service providers, named in the privacy policy. No other provider touches it.
The synced record is encrypted with a key only you hold, generated on your device. The server stores only encrypted data, so it cannot read your profile on its own. The honest framing is that the server is still a trusted party for synced data: a fully compromised server that is still running can act on a user who logs in. That limit is stated here rather than hidden.2
Two further honest points.
- A compromised server that is still running can act on a user who logs in. No encryption design changes that, because the running server is part of the session.
- There is nothing to print or store. Recovery runs through the account you created.
What we deliberately do not build
Security is about what a product refuses to add as much as what it hardens. These absences are load-bearing:3
- No third-party code in the local path. Strict nonce-based content security policy, camera, microphone and location blocked, and framing blocked.
- No AI or large language model in local mode. The local analysis engine is deterministic math. There is no model call in the local path to leak to and no local inference surface. Premium AI is a separate, explicit opt-in, disclosed in the privacy policy, and an active job is not blind.
- No cross-user features. There is no path by which one account's archive can be served to another, and the per-archive media namespacing closed the one place that had been possible.
- No server secret in the client bundle. The server never returns key material or account identifiers to the client.
- No third-party error or analytics vendor. There is no analytics vendor at all; the report collector logs a deduplicated summary locally and discards it. Nothing is forwarded.
None of that makes a system secure on its own. The list is short and checkable on purpose. A small surface is easier to audit than a large one, and every item here is something the code enforces.
What this means for you
In local mode, the trust question is small. Your archive is processed on your device, and the app gives you a page to watch that be true. If you choose a server feature, you are choosing to trust that server to the degree described above. The account layer's field encryption and the sync tier's encryption are real mitigations, and their limits are named rather than hidden.
The principle underneath it all is least trust. Local-first by default. Every networked feature is opt-in and gated by configuration. Archive contents are never uploaded unless you opt into a feature that requires it.
How to read it honestly
Four rules keep this post honest:
- The archive is the source, not the app. Every count is rows the export actually carried, derived locally.
- An empty list is missing data, not a zero. An absent file reads as empty, never as a confirmed count.
- A label is Meta's, not yours. Interests, topics and locations are inferences or free text, not statements you made.
- Local is the default. All of it is processed on your device; the server surfaces are opt-in and separate.3
How does the app defend against ZIP bombs?
Extraction screens declared sizes and compression ratios before inflating anything. It caps entry counts and sizes, and it refuses traversal. Processing is bounded and cancellable through an AbortSignal.
What about prototype pollution in archive JSON?
Untrusted keys (__proto__, constructor, prototype) are rejected, ledger dictionaries are built prototype-less, and merge points use Object.defineProperty instead of Object.assign. The personal-information parser uses the same guard.
Is the sync tier on by default?
No. It is strictly opt-in. Media is never stored, messages sync only under an explicit per-field consent, and it requires explicit configuration. Local mode remains the default.
Does the sync tier really deliver 'no single point of leak'?
The server cannot read a synced profile on its own, because the key stays with you. A fully compromised server that is still running can act on a user who logs in, and that limit is documented rather than hidden. The claim is that the server is a trusted party for synced data, not that it is incapable of harm.
Why run parsing in a Web Worker?
For isolation, to keep the UI smooth, and to bound work against untrusted input. A pathological file is contained rather than allowed to freeze the page.
Can the app prove it does not send my archive anywhere?
In local mode, yes. The Security → Live security verify page runs the parsing pipeline while watching outbound requests, so you can observe the absence of network calls rather than trust a sentence. The site runs no analytics at all, so there is no measurement call to exempt from that proof.
What is in the security and privacy section of my export?
A security_and_login_information folder plus several small datasets, modeled as the two types above: the privacy surface (sign-ins, interests, advertisers, topics, watched videos, visited links, account history and more) and the security surface (signup, logouts, password and privacy changes, devices, last known location, profile activity). Lists the export does not carry stay empty rather than becoming a confirmed zero.
Can this tell me what I actually watched, bought, or like?
No. It counts the rows the export recorded and shows their values and timestamps, but it does not interpret them. An ad interest is an inference the platform attached to the account, not a preference you stated. videosWatched and linksVisited prove a row exists; they do not measure attention or intent.
Questions this comes up
The login-history post reads the login_activity file in full and prints the
score arithmetic built on it. The personal-information post covers the profile
fields the archive records about the account itself. The what's-in-the-export
post maps the folders these datasets sit in, and the local-first and
is-it-safe-to-upload posts carry the same trust question from the reader's side.
Sources of truth
- The security posture, as enforced in the open-source engine: local mode by default; untrusted-archive hardening; bounded processing and cancellable extraction; per-archive media namespacing.
- The privacy and security dataset readers —
PrivacyDataand its login/per-field collectors, andSecurityDatawith its device and location records. - The product's own local-mode rules — no AI/LLM in local mode, no cross-user features, no third-party trackers — plus the separate premium AI exception.
- The response middleware — content security policy, permissions policy and frame-ancestors.
Footnotes
- The application's security notes — a fully compromised server that is
still running can act on a user who logs in; the earlier "no single point of
leak" wording overstated what the code delivers.↩ - The application's security notes — local-mode guarantees, untrusted-archive
hardening, bounded processing and cancellable extraction, prototype-pollution
hardening, and the off-by-default server surface.↩
For developers — source references
Pointers into the open-source code that implements the behaviour described above.
packages/shared/src/parsers/privacy.ts—PrivacyParser.parseJSON
(L266-299) collects each dataset by filename:loginsonly fromlogin_activity.jsonviaextractLogins(L138-195), ad interests and advertisers
(L285-286), synced contacts (L287), topics (L288), videos watched (L289), links
visited (L290).extractGeneric(L4-78) flattens a structure to its values and
setstitle: ''(L16);extractAccountHistory(L80-136) keeps the field key as
the title (title: keyL109,title: lv.labelL123). The HTML branchparseHTML(L301-331) rebuilds the same lists from tables viaextractHTMLRows
andextractLoginsHTML(L197-258).↩packages/shared/src/types/privacy.ts—PrivacyData(L12-27):logins,adInterests,advertisers,syncedContacts,yourTopics,videosWatched,linksVisited,notificationPreferences,eligibility,accountHistory,threads,aiInteractions,shopping,fundraisers;LoginRecord(L3-10):ip,userAgent,device,location,time,timeLabel.↩packages/shared/src/types/security.ts—SecurityData(L23-41):signup,logouts,passwordChanges,privacyChanges,statusChanges,lastKnownLocation?,devices,camera,secretDevices,profileActivity,cameraEffects;emptySecurityDatadefaults every list to[](L43-56);DeviceRecord(name,os,deviceType,lastActive, L4-9);LastKnownLocation(label,timestamp, L11-15) with the "imprecise last known
location — a coarse place, not a fix" comment (L11); theprofileActivitydoc
comment naming IP, app, user agent, device and login time (L33-38). TheSecurityParser(L94-138) matches each dataset's filename (L12-24) and buildsdevicesonly fromextractDevices(L49-92), skippingprofile_activity
(L117).↩