This library verifies identity documents, so a flaw in it can matter to someone relying on its answer. Reports are welcome and taken seriously.
Please do not open a public issue. Use GitHub's private vulnerability reporting instead: the Security tab of this repository, then Report a vulnerability. Only the maintainer can see the report.
Include what you found, how to reproduce it, and what an attacker could do with it. If reproducing it needs a document, describe the document rather than sending its data: never include a real passport's MRZ, personal details, images or raw data groups.
You can expect an acknowledgement within two weeks. This is a small project maintained in spare time, so a fix may take longer; you will be kept informed, and credited in the fix unless you would rather not be.
- A wrong verdict. Anything that makes the
VerificationReportsaySUCCEEDEDwhen it should not: a forged or altered document passing Passive Authentication, a cloned chip passing Chip Authentication, PACE-CAM or Active Authentication, or EF.CardAccess hiding PACE without the PACE check failing. - Personal data leaking. MRZ fields, names, document numbers, images or
key material reaching release-build logs, a
CheckResultreason, an exception message, or anywhere else outside thePassportreturned to the app. - A malformed chip response causing harm beyond a failed read: a crash of the host app, unbounded memory use, or a hang that a cancel does not end.
- An unverified image reaching a decoder when the app has not set
decodeUnverifiedImages. - The bundled trust anchors, if the refresh script could be made to accept a master list not signed by the BSI. It checks the list's signature against the signer certificate the list carries, not against a BSI root; see docs/architecture.md.
- The six countries with no bundled CSCA anchor (GH, ID, IR, KZ, NG, YE).
Their passports fail Passive Authentication by design, and Chip and Active
Authentication cannot succeed for them: a key the chip proves is reported
as
NOT_CHECKED, since it cannot be traced to an issuer. Their images are not decoded unless the app setsdecodeUnverifiedImages. See NOTICE.md. - Checks the chip does not support. A chip without Chip or Active
Authentication cannot prove it is genuine; the report shows Active
Authentication as
NOT_PRESENTand chip authentication as absent. That is a property of the document. - Document signer keys outlive their certificates. The chain is judged at the signing time the document records, which the signer itself chooses, or, when it records none, at the document signer certificate's start date, where that certificate's expiry is never reached. Either way a document signer key compromised after its certificate expired can still produce documents that chain. No CRL is consulted either, so a revoked key is not detected. Expired passports are the reason for this trade-off; see docs/architecture.md.
- What an app does with the report. Deciding whether a result is good enough is the application's responsibility.
- Vulnerabilities in JMRTD, SCUBA, BouncyCastle or OpenJPEG themselves. Please report those upstream. If this library's use of them makes a problem worse, that is in scope.
Only the latest release receives fixes.