Biometric Spoofing: Attack Types and Countermeasures (2026)
Biometric spoofing is a fake face, replay, mask or synthetic face presented to a camera. Stop it with the liveness method matched to your risk, then chain face match, face search and device checks.

Contents
In this guide
Jump to the part you need.
Biometric spoofing is an attacker presenting a photo, a screen replay, a mask or a synthetic face to a camera to pass as someone else. This guide covers the attack types, the control that stops each, and the Didit steps to switch them on. Passive liveness is $0.10 per check. Standalone server-to-server API calls are listed in the price book at their own per-call prices. The caveat: liveness is one layer, not a full fraud decision.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Attack | What the attacker presents | Countermeasure | Didit control and list price |
|---|---|---|---|
| 2D print or photo | Printed portrait or a photo on paper | Texture and artifact analysis on a single frame | Passive Liveness, $0.10 per check |
| Screen replay | A recorded video played on a phone or tablet | Depth map built from projected light patterns | 3D Flash, Active Liveness, $0.15 |
| 3D mask or silicone replica | A physical replica of the face | Depth sensing plus a randomized action | 3D Action and Flash, Active Liveness, $0.15 |
| Deepfake or injected camera | A synthetic face generated live | Light response, micro-expression and the liveness model | 3D Action and Flash, $0.15 |
| Morphed portrait on a document | A document photo blended from two faces | 1:1 match to the document portrait plus a chip check | Face Match $0.05, NFC $0.15 |
| Duplicate identity or fraud ring | A real person reusing a face | 1:N search of your own face index | Face Search, $0.05 per search |
| Remote or scripted access | A fresh face on a hostile device or network | Device and network signals | Device and IP Analysis, $0.03 |
Start free in the sandbox at business.didit.me, no sales call. Developers can connect Didit to an AI assistant through the Didit MCP server. List prices sit on the pricing page and in machine-readable form at pricing.json.
What anti-spoofing biometrics has to cover
Anti-spoofing biometrics is the set of checks that decide whether the face, finger or voice sample at the sensor came from a live human at that moment. The phrase is used loosely in the market. Inside a verification flow it means three separate things that fail in different ways: presentation attack detection, which asks whether the sample is real; biometric matching, which asks whether this is the right person; and context checks, which ask whether this device, place and behaviour fit the account. A control that covers only the first one leaves the other two open.
Presentation attacks are grouped by how the fake sample is produced. Each category leaves different traces, so detection logic has to look for different signals rather than run one generic test.
- Artifact attacks. A physical object such as a printed photo, a paper cut-out or a 3D mask is held in front of the camera. Traces: a flat surface, print texture, wrong depth.
- Replay attacks. A previously captured video of the real user is played back on a screen. Traces: refresh patterns, glare, pixel movement that does not follow the lighting.
- Deepfakes and injected video. A synthetic face is generated in real time, or a virtual camera replaces the device camera stream. Traces: blending at the face edge, missing micro-expressions, no depth.
- Morphing attacks. One image blends two people so the same document or template matches both. Traces: blended edges and inconsistent facial geometry.
- Duplicate faces and fraud rings. A genuine live person who has already opened accounts under other identities. Traces: a 1:N match inside your own face index.
- Coercion. A genuine live person acting under instruction. Liveness passes by definition, and only context checks and policy catch it.
Prerequisites
- A Didit account and an API key. Sandbox processing is free.
- A workflow with the liveness feature enabled, and the liveness method chosen for the risk level of the flow.
- A capture surface: the hosted
session.urlwith the Web or Mobile SDK, or your own capture for the standalone API route. - For the server-to-server route, a front-facing image under 5 MB in jpg, jpeg, png, tiff or webp. PDFs are rejected.
- A written rule for every warning code before launch: which codes decline, which retry, which go to a human, and what the reviewer sees.
- For Illinois, Texas and Colorado, explicit biometric consent before the selfie. Didit documents the triggers and decision fields at biometric consent.
Step by step: add anti-spoofing to a Didit flow
- Write the attack list for your flow. Face only, document plus face, or re-authentication at login. Give each applicable row above a control, then put a number on the cost of a false accept and the cost of a false reject. Those two numbers set your thresholds, not a vendor default.
- Choose the liveness method.
face_liveness_methodacceptsPASSIVE,ACTIVE_3DorFLASHING, set in the Business Console or throughPOST /v3/workflows/. Passive is single-frame analysis at $0.10, the cheapest option and the right fit for low-risk flows. Flashing projects light patterns and builds a depth map with no user action. Active 3D adds a randomized action such as a blink or a nod on top of flashing, costs $0.15, and fits banking, healthcare and government flows where masks and deepfakes are realistic attacks. - Create the session.
POST /v3/session/withworkflow_id,vendor_dataandcallback. Use your own user id invendor_data: the passive liveness route excludes prior faces with the samevendor_datafrom duplicate checks, so a legitimate re-run does not raise a duplicate warning. - Open
session.urlor mount the SDK. Camera capture, the action prompt and the light pattern run inside the hosted session or the SDK, and your app receives the documented decision data. - Read the decision. Call
GET /v3/session/{sessionId}/decision/or subscribe tosession.status.updated. Liveness results land inliveness_checks[], one entry per liveness node in the workflow. - Fail closed on the two attack codes.
LIVENESS_FACE_ATTACKmeans the model detected a presentation attack.LOW_LIVENESS_SCOREmeans the score sat at or belowface_liveness_score_decline_threshold, default 30. Neither is an approval. - Chain a 1:1 face match. Liveness only says a real person is present.
POST /v3/face-match/compares the live selfie with the portrait on the ID document for $0.05, and a score at or belowface_match_score_decline_thresholdreturnsDeclined. - Add 1:N face search if accounts are the target.
POST /v3/face-search/searches your application's face index and returns up to 5 ranked matches with the session each one came from, at $0.05 per search. Face Search provides explicit 1:N cross-account search for duplicate identities and fraud-ring investigation. - Add context checks, then raise the document bar on high risk. Device and IP analysis runs inside every session at $0.03 and flags VPN, proxy, Tor, duplicate device and location mismatch with the document. On high-risk flows, NFC chip reading adds a cryptographic check of the passport or eID at $0.15.
The three methods are workflow settings, not separate integrations. PASSIVE runs Passive Liveness, FLASHING runs 3D Flash, and ACTIVE_3D runs 3D Action and Flash, chosen in the Business Console or through POST /v3/workflows/. The standalone endpoint is passive only, so the other two methods require a session.

Runnable example: one-shot passive liveness
Use the standalone route when you already hold a captured selfie and want a verdict without a full session. It is passive only, and it is the standalone route for testing an existing captured image against a spoof.
curl -X POST 'https://verification.didit.me/v3/passive-liveness/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./selfie.jpg' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'
With save_api_request=true the call is stored as an API-type session and the returned request_id can be read back through the decision endpoint. Set it to false for a one-shot check with nothing stored and no face enrolled.
curl 'https://verification.didit.me/v3/session/SESSION_ID/decision/' \
-H 'x-api-key: YOUR_API_KEY'
What the response looks like
An approved response carries status set to Approved, together with a score and a warnings array. Read the two fields together: score is the 0 to 100 value the model produced and warnings lists the risk codes that fired. A presentation attack returns Declined and names the reason in warnings. The fields below are the ones the docs define for the passive liveness shape.
{
"request_id": "YOUR_REQUEST_ID",
"liveness": {
"status": "Declined",
"method": "PASSIVE",
"score": 12,
"warnings": ["LIVENESS_FACE_ATTACK"],
"face_quality": 88,
"face_luminance": 54
}
}
Read face_quality and face_luminance before you blame the user. NO_FACE_DETECTED means the model found no face, so ask the user to retry with a single, well-framed face. A low liveness score on a sharp, well-lit image is a fraud signal.

Failure cases and recovery
| Signal | Meaning | Recovery |
|---|---|---|
| HTTP 403 | Out of credits, or an invalid key | Top up or fix the key. This API returns 403, never 401. |
| HTTP 400 | Missing user_image, file over 5 MB, unsupported extension | Resize and re-encode to jpg or png, then retry. Validation runs even in sandbox. |
LIVENESS_FACE_ATTACK | Presentation attack detected | Do not approve. Decline and log for fraud review. |
LOW_LIVENESS_SCORE | Score at or below the decline threshold, default 30 | Decline or step up to active liveness, per your policy. |
NO_FACE_DETECTED or MULTIPLE_FACES_DETECTED | Nobody, or more than one person, in frame | Ask for a retry with a single, well-framed face. Multiple faces is a warning severity signal, it does not decline on its own. |
FACE_IN_BLOCKLIST | The face matches an entry on your own blocklist | Block. This one does decline. |
DUPLICATED_FACE | The same face already appeared in an approved session | Information severity, never declines. Route to review if duplicate accounts matter to you. |
| HTTP 429 | Shared write budget of 300 requests per minute per key | Back off and retry. Budget is shared across POST, PATCH and DELETE. |
Static Approved in sandbox | Sandbox processing is free and skips all billing | You cannot test spoof rejection in sandbox. Run attack tests with a live key on a test application. |

Inputs and outputs
| Field | Direction | Notes |
|---|---|---|
user_image | Input, required | Front-facing face image, max 5 MB, tiff, jpg, jpeg, png or webp. Compressed to about 0.5 MB before processing, so higher resolution does not improve accuracy. |
ref_image | Input, face match only | The reference portrait, typically the ID document photo. |
vendor_data | Input, optional | Your user id. Excludes that user's prior faces from duplicate matching on the passive liveness route. |
save_api_request | Input, optional | Default true. Persists the call as a session and enrolls the face in your index. false stores nothing. |
face_liveness_score_decline_threshold | Input, optional | Default 30. Declined at or below this score. |
face_match_score_decline_threshold | Input, optional | Default 30. Approved only above this score. |
status | Output | Approved, Declined, In Review, Abandoned, Not Started, In Progress or Kyc Expired. |
score | Output | 0 to 100 liveness or similarity score. |
warnings | Output | Risk codes such as LIVENESS_FACE_ATTACK or LOW_FACE_MATCH_SIMILARITY. |
Paid steps and review boundaries
Every 200 response consumes one credit. In a session, passive liveness is $0.10, active liveness $0.15, face match $0.05, face search $0.05, device and IP $0.03, ID document verification $0.15 and NFC $0.15. Standalone server-to-server API lines carry their own per-call prices in the price book. Sandbox calls are free and consume nothing. The full breakdown and plan discounts are on the pricing page, the billing rules are in the pricing docs, and the module behaviour is documented in the liveness overview.
Draw three review boundaries and write them down. Automatic decline covers LIVENESS_FACE_ATTACK, LOW_LIVENESS_SCORE and FACE_IN_BLOCKLIST. Automatic retry covers NO_FACE_DETECTED and MULTIPLE_FACES_DETECTED. Duplicate-face signals such as DUPLICATED_FACE are information severity and never decline automatically, while device and IP warnings such as VPN_DETECTED, PROXY_DETECTED, TOR_DETECTED and LOCATION_MISMATCH_WITH_DOCUMENT are handled according to your policy, which can decline, review or step up. Coercion produces no liveness signal, so it needs its own escalation path, typically a step-up factor and a limit on what a freshly verified account can do on day one.
Worked cost example
Take 20,000 completed verifications a month, all full ID checks at $0.33. That line is built from ID document $0.15, passive liveness $0.10, face match $0.05 and device and IP $0.03, which sums to $0.33.
20,000 x $0.33 = $6,600 per month at list price.
A risk review says mask and deepfake exposure justifies active liveness. The passive liveness line of $0.10 is replaced by active liveness at $0.15, so the increase is $0.05 per check: 20,000 x $0.05 = $1,000. The new monthly list total is $6,600 + $1,000 = $7,600.
On the Scale plan, every Didit price is 10% lower. The full check becomes $0.297: 20,000 x $0.297 = $5,940. The active liveness upgrade becomes $0.045: 20,000 x $0.045 = $900. Total $5,940 + $900 = $6,840.
If you add 1:N face search on 5,000 of those checks at $0.05 per search: 5,000 x $0.05 = $250 a month, taking the active-liveness list total from $7,600 to $7,850.
Beyond the face: voice, document and chip attacks
Spoofing is not a face-only problem. Voice systems are attacked with recordings and synthesized audio. Documents are attacked with morphed portraits, replaced photographs and tampered chips. A threat model should cover every modality in the flow, not only the selfie step, and the countermeasure changes with each one: an NFC chip read verifies cryptographic signatures issued by the passport or eID authority at $0.15, while a printed portrait is only as strong as the 1:1 match against the live face.
The testing framework matters as much as the technique. ISO/IEC 30107 defines how presentation attacks are categorised and how a system's resistance is measured, so ask whether a liveness component was tested against it rather than only on a vendor demo set. Didit's liveness detection is iBeta Level 1 and Level 2 certified, and the documented accuracy is 99.9% with a false acceptance rate under 0.1%.
No single check covers every attack, which is why layering pays. Light-pattern depth analysis is designed to resist static images, replays and masks. Texture analysis handles prints. A randomized action handles static and pre-recorded media. A document chip check handles morphed or altered documents.
Biometrics are unique but not secret
That sentence is the whole threat model in six words. Uniqueness is why a face works as an identifier. Not being secret is why a face is cheap to copy: you leave it on social media, on video calls and on the document you upload. A leaked password can be rotated. A face cannot, which is why a selfie should never be treated as a shared secret that proves identity on its own.
The practical consequence for replay attacks is that the sample must be bound to this session, this moment and this device. A random action and a light pattern that change per attempt break pre-recorded media and pre-built masks. A 1:1 match to the document portrait makes a fresh, unrelated face useless. A device and IP check catches the same handset cycling through identities. Together those three raise the cost of a replay far above the value of the account.
Coercion is the case liveness cannot solve, because the person in front of the camera is real and present. Treat it as an authentication and policy problem: step up to a second factor on high-value actions, cap what a new account can move, and watch for behaviour that does not fit the account history. Didit runs verification for 4,000+ companies, and the teams that handle coercion well are the ones that separate proving a live human from authorising a specific transaction.
Sources
- Didit docs: Liveness Detection overview, read November 26, 2026
- Didit docs: Passive Liveness API, read November 26, 2026
- Didit docs: Face Match API, read November 26, 2026
- Didit docs: Face Search API, read November 26, 2026
- Didit docs: Device and IP analysis, read November 26, 2026
- Didit docs: NFC verification, read November 26, 2026
- Didit docs: Biometric consent for BIPA, CUBI and Colorado, read November 26, 2026
- Didit docs: Pricing and billing rules, read November 26, 2026
- Didit pricing page, read November 26, 2026
- Didit price feed as JSON, read November 26, 2026
- ISO/IEC 30107-3, biometric presentation attack detection testing (standard reference)
- Images: Didit product screens, face scanning, session detail liveness and session overview, from didit.me, read November 26, 2026
Next step: open the sandbox at business.didit.me, create a workflow with the liveness method you picked, and send one real selfie and one printed photo through the Passive Liveness API to inspect the returned score and warning data. No sales call.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What is biometric spoofing?
Biometric spoofing is presenting a fake biometric sample to a system so it accepts you as someone else. For face verification that means a printed photo, a screen replay, a 3D mask or a synthetic deepfake. Countermeasures are grouped as presentation attack detection, biometric matching and context checks.
What is the difference between a presentation attack and a deepfake?
A presentation attack is any fake sample shown to a sensor, including a paper photo or a silicone mask. A deepfake is a specific technique where a model generates or alters a face in real time. Both are caught by liveness detection, but a deepfake also needs checks for injected camera streams and blending artifacts at the face edge.
Does liveness detection stop all spoofing?
No. Liveness answers one question: is there a live human in front of the camera. It does not prove the human is the account owner, does not catch a real person opening duplicate accounts under a second identity, and is not designed to identify coercion. That is why a face flow usually chains liveness with a 1:1 face match against the document, 1:N face search and device signals.
What does it mean that biometrics are unique but not secret?
A face identifies one person, but it is not a secret: it is visible in photos, videos and on the ID document you upload. A leaked face cannot be rotated like a password, so a selfie should never be accepted as a standalone secret. Bind each sample to the session with a random action and a light pattern, and match it to the document portrait.
How do you stop a replay attack on a face verification?
Use a challenge that a pre-recorded video cannot answer. Didit's 3D Action and Flash prompts a randomized action such as a blink or a nod while projecting light patterns and reading the reflections to build a depth map. The method is designed to detect mismatched depth and action responses in replayed media.
What do you do when the person is real but being coerced?
Liveness passes, because nothing is spoofed. Handle it as an authorisation problem rather than an identity problem: require a second factor for high-value actions, cap new-account limits, and watch for behaviour that does not match the account history. Liveness is not designed to identify coercion, so it needs a separate policy or escalation path.
What is ISO/IEC 30107 and why does iBeta certification matter?
ISO/IEC 30107 is the standard that defines how presentation attacks are categorised and how a system's resistance is measured. Didit's liveness detection is iBeta Level 1 and Level 2 certified, an independent result rather than a vendor benchmark. Buyers should ask for the certification level rather than judge a liveness check on a demo set.
Which liveness method should I choose?
Passive liveness for low-risk flows where a single-frame check is enough, at $0.10 per check. 3D Flash when you need depth without asking the user to do anything. 3D Action and Flash for banking, healthcare and government flows where masks and deepfakes are realistic, at $0.15 per check.
How much does anti-spoofing cost per check?
Inside a Didit session, passive liveness is $0.10, active liveness $0.15, face match $0.05, face search $0.05, device and IP analysis $0.03 and NFC $0.15. A full ID check bundling document, liveness, face match and device checks is $0.33. Standalone server-to-server API lines carry their own per-call prices in the price book.
Which status and warning codes mean a spoof was detected?
A spoof shows up as status set to Declined with the warning LIVENESS_FACE_ATTACK, or with LOW_LIVENESS_SCORE when the score sits at or below the decline threshold of 30. NO_FACE_DETECTED and MULTIPLE_FACES_DETECTED are capture problems, not attacks, and are usually fixed by a retry.
Can I test spoof detection in the sandbox?
Not for the verdict. Sandbox API keys skip all processing and billing and return a static Approved mock payload, though malformed input still returns 400. Run your attack tests with a live key on a test application, where a fake photo or replay will return a real liveness score and warning code.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


