skip to content

NFC poster tags on campus open an unexpected website: how should a reader app treat a tag's URI, and what does Android do itself?

level: seniorimportance: should knowfreq 26%

answer

  1. tag content is input, not instruction
  2. show the destination first
  3. expected scheme and host only
  4. Android 16 and 17 changed web links
  5. a lock does not stop a swap

basics

~20 s

Treat a tag's URI as untrusted input: show where it leads, ask before opening, and accept only expected schemes and hosts. Android 17 adds an open-link notification for web-link tags that needs explicit user interaction.

solid answer

~50 s

Tags are often rewritable and can always be physically replaced, so a URI read from one is untrusted input. A reader app should show the full destination and ask before acting, accept only the URL schemes and hosts it expects, and ignore the rest. On Android, the documentation says that starting in Android 16 a tag holding an http or https link triggers the view intent instead of the NDEF-discovered intent, and from Android 17 it surfaces an open-link notification that requires explicit user interaction. The venue should write-protect tags it owns after provisioning, and inspect posters, because a lock protects the contents and not the tag's place on the wall. Confirmation costs the user one extra step and the allow-list costs a maintained list of the venue's hosts, but neither depends on who wrote the tag.

go deeper

for a junior

Know that a tag is untrusted input and that an app should show where a link leads and ask before opening.

for a middle

Describe the allow-list of schemes and hosts, and what Android 16 and 17 changed for web-link tags.

for a senior

Combine app controls with the venue's tag inventory, locking and inspection, and say what each signal can and cannot show.

for a principal

Decide how much of the tag-handling policy sits in the platform, the app and the venue's operations, and who owns the posters.

## The threat model An NFC tag is a small writable memory that a phone treats as an instruction source: the phone reads it and, for a web link, may open a browser. The reader's trust boundary is the point where tag content turns into an action. NIST SP 800-98 lists, among the human threats to tags, the ability of an adversary to remove a tag from its item, replace a tag with another one, or clone a tag and use the clone for an unintended purpose, and it notes that for many tags a reader does not need to receive a message from the tag before writing to the tag's memory. So a campus poster tag can lead somewhere other than where the venue intended, either because its contents were rewritten or because another tag now sits where the original was. How tags are rewritten is outside this answer; the defender's questions are what the app does with the content and what the venue does about the tags. ## What the Android documentation says The platform's tag dispatch system parses a discovered tag and starts an application interested in the data. The documentation records these points: - Devices are usually looking for tags when the screen is unlocked, unless NFC is turned off in Settings. - The dispatch system defines three intents in priority order: `ACTION_NDEF_DISCOVERED`, `ACTION_TECH_DISCOVERED` and `ACTION_TAG_DISCOVERED`. - Starting in Android 16, scanning an NFC tag that stores a web link, meaning the URI scheme is `http://` or `https://`, triggers the `ACTION_VIEW` intent instead of `ACTION_NDEF_DISCOVERED`. - Beginning with Android 17, scanning such a tag surfaces an "open link" notification, which requires explicit user interaction to trigger the `ACTION_VIEW` intent. These are platform behaviours for web links. They do not replace the app's own handling for other schemes or for tags the app registered for. ## What the reader app does 1. **Treat the payload as untrusted input.** Parse it, then validate it before any action. 2. **Show the destination.** Display the full host, not a prefix, and wait for the user to confirm before opening it. A tap is a cheap gesture; confirmation makes the action deliberate. 3. **Allow-list.** Accept only the schemes and hosts the app expects. Reject others, including schemes that launch other apps, and tell the user why. 4. **Do not act silently.** Never perform a state-changing action, such as sending a message, joining a network or starting a download, from a tag without a prompt that names it. 5. **Report rejections.** A count of rejected tag URIs by app version is a useful signal that a tag in the field has changed. ## What the venue does - **Inventory the tags it owns.** Know how many, where, and which URL each carries. - **Write-protect tags after provisioning.** NIST describes a lock feature that provides read or write protection to memory and notes that on some RFID technologies the lock is permanent and on others reversible. Which lock options an NFC tag type offers belongs to the material on tag types; in a review, ask whether the tags the venue owns are locked. - **Remember what a lock does not cover.** NIST notes that locking memory does not prevent data loss from electromagnetic interference or physical tag destruction, and a lock does not stop a different tag being placed over or in place of the original. Periodic physical inspection of posters, and tamper-evident placement, still matter. - **Use URLs the venue controls.** A tag pointing at a domain or redirect service the venue can lose control of turns an expired registration into a hostile landing page. ## How the condition is noticed | Signal | What it shows | What it cannot show | |---|---|---| | A user or staff report that a poster opened an unexpected site | A tag now leads somewhere unintended | Whether the contents changed or a different tag replaced it | | Rejected-URI counts in the app | Tags in the field carry unexpected hosts | Which poster they came from, unless the app logs the tag location | | Landing-page hits on the venue's own URLs, one path per poster | Which tags are in use | Anything about tags pointing elsewhere | ## Interview framing A strong answer starts with "tag content is untrusted input", gives the three app controls (show, confirm, allow-list), cites the Android 16 and 17 behaviour at the strength the documentation states, and finishes with the venue's tag inventory, locking and inspection. A weak answer says to trust a tag because it was physically tapped, or that locking tags removes the need for the app to validate. The record format and how platforms choose which app handles a tag are covered with the material on NDEF.

  • If the venue locks every poster tag, can the app skip allow-listing?
    No. The app also reads tags the venue does not own, and a lock protects only the contents of the tag it was applied to. A different tag can sit where the original was. The allow-list and confirmation protect the user whatever the tag, and the lock reduces how often a venue tag is altered.
  • What changed in how Android handles a web-link tag from Android 16 to 17?
    The documentation says that starting in Android 16 such a tag triggers the view intent instead of the NDEF-discovered intent, and from Android 17 it surfaces an open-link notification that requires explicit user interaction. That moves a deliberate step into the platform for web links. Other schemes and registered apps still rely on the app's own checks.

  • Opens any URI silently because the tag was physically tapped
  • Verifies a tag by checking its identifier against a known list
  • Says locking a tag also prevents a different tag replacing it
  • Treats the short range as proof the tag content is trustworthy
  • Claims Android requires a confirmation for every tag scheme