V1.0.0 RC - #182
Conversation
…he mappings: block, renamed to maswe-beta:
…nt named IDs from the Core App Quality checklist, and the two legacy-style mappings were migrated
… multiple weakness documents
…he MASWE metadata
| - Collecting data under consent that is bundled, implied, or otherwise not freely and specifically given. | ||
| - Continuing to collect data under an outdated consent after practices have changed. | ||
| - Exporting or sharing data through flows whose privacy consequences are not evident to the user. |
There was a problem hiding this comment.
doesn't sound like attacks
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Applied a bunch of Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com> Co-authored-by: Stefan <s.bernhardsgruetter@proton.me> Co-authored-by: Jeroen Beckers <me.githbub@dauntless.be>
| - https://developer.android.com/google/play/integrity/classic | ||
| - https://developer.apple.com/documentation/devicecheck |
There was a problem hiding this comment.
Adding references for standard key attestation
| - https://developer.android.com/google/play/integrity/classic | |
| - https://developer.apple.com/documentation/devicecheck | |
| - https://developer.android.com/google/play/integrity/classic | |
| - https://github.com/android/keyattestation | |
| - https://source.android.com/docs/security/features/keystore/attestation | |
| - https://grapheneos.org/articles/attestation-compatibility-guide | |
| - https://developer.apple.com/documentation/devicecheck |
|
|
||
| This weakness occurs when an app does not implement device attestation, so its backend cannot distinguish requests made from genuine, uncompromised devices from those coming from rooted, emulated, tampered, or automated environments. | ||
|
|
||
| Device attestation uses platform services, such as the Android Play Integrity API or iOS DeviceCheck and App Attest, to provide the backend with cryptographically verifiable evidence about the device associated with a request. The evidence and security properties differ by platform and service. Without device attestation, the backend cannot independently verify device-origin claims made by the client. The backend must validate attestation evidence and apply the service-specific request-binding, freshness, and replay protections; client-side evaluation is another bypassable local check. |
There was a problem hiding this comment.
Mention hardware attestation API
| Device attestation uses platform services, such as the Android Play Integrity API or iOS DeviceCheck and App Attest, to provide the backend with cryptographically verifiable evidence about the device associated with a request. The evidence and security properties differ by platform and service. Without device attestation, the backend cannot independently verify device-origin claims made by the client. The backend must validate attestation evidence and apply the service-specific request-binding, freshness, and replay protections; client-side evaluation is another bypassable local check. | |
| Device attestation uses platform services, such as the standard Android hardware attestation API, the Play Integrity API or iOS DeviceCheck and App Attest, to provide the backend with cryptographically verifiable evidence about the device associated with a request. The evidence and security properties differ by platform and service. Without device attestation, the backend cannot independently verify device-origin claims made by the client. The backend must validate attestation evidence and apply the service-specific request-binding, freshness, and replay protections; client-side evaluation is another bypassable local check. |
|
|
||
| Device attestation uses platform services, such as the Android Play Integrity API or iOS DeviceCheck and App Attest, to provide the backend with cryptographically verifiable evidence about the device associated with a request. The evidence and security properties differ by platform and service. Without device attestation, the backend cannot independently verify device-origin claims made by the client. The backend must validate attestation evidence and apply the service-specific request-binding, freshness, and replay protections; client-side evaluation is another bypassable local check. | ||
|
|
||
| On Android, Play Integrity can provide server-verifiable assurance that the device has not been compromised in ways covered by its device-integrity verdicts, such as an unlocked bootloader or an unrecognized operating-system image. On iOS, DeviceCheck and App Attest do not provide equivalent assurance about operating-system compromise. They can establish that evidence originates from genuine Apple hardware; App Attest also binds that evidence to a legitimate app instance, but neither service attests the integrity of iOS. |
There was a problem hiding this comment.
Mention hardware attestation API
| On Android, Play Integrity can provide server-verifiable assurance that the device has not been compromised in ways covered by its device-integrity verdicts, such as an unlocked bootloader or an unrecognized operating-system image. On iOS, DeviceCheck and App Attest do not provide equivalent assurance about operating-system compromise. They can establish that evidence originates from genuine Apple hardware; App Attest also binds that evidence to a legitimate app instance, but neither service attests the integrity of iOS. | |
| On Android, both the hardware-backed attestation and Play Integrity APIs can provide server-verifiable assurance that the device has not been compromised in ways covered by its device-integrity verdicts or signals, such as an unlocked bootloader, an unrecognized operating-system image or an outdated security patch level. Their main differences include: | |
| - **Google Mobile Services (GMS) Requirement**: Direct hardware-backed key attestation uses Android Keystore and does not require Google Play services on the device to request an attestation. Play Integrity depends on Google Play components and Google services. | |
| - **Verdict Generation and Policy Enforcement**: With direct key attestation, the backend receives signed properties and defines which boot states, operating-system signing keys, patch levels, and application identities it accepts. Play Integrity evaluates the available signals and returns Google-defined verdict labels. In both cases, the developer decides how the backend responds. | |
| On iOS, DeviceCheck and App Attest do not provide equivalent assurance about operating-system compromise. They can establish that evidence originates from genuine Apple hardware; App Attest also binds that evidence to a legitimate app instance, but neither service attests the integrity of iOS. |
Co-authored-by: Stefan <s.bernhardsgruetter@proton.me>
|
|
||
| ## Modes of Introduction | ||
|
|
||
| - **Missing Validation at Trust Boundaries**: Consuming data from the network, backups, external interfaces, files, UI, or IPC without validating type, length, format, and range before use. |
There was a problem hiding this comment.
| - **Missing Validation at Trust Boundaries**: Consuming data from the network, backups, external interfaces, files, UI, or IPC without validating type, length, format, and range before use. | |
| - **Missing Validation at Trust Boundaries**: Consuming data from untrusted boundaries, like network, backups, external interfaces, files, UI, or platform IPC without validating type, length, format, and range before use. |
There was a problem hiding this comment.
This looks like a generic one while the following bullet points detail a bit more the wording for common vulnerabilities like SQLi, deserialization attacks, etc. I feel that we can leave both, the detailed and the specific ones.
| ## Modes of Introduction | ||
|
|
||
| - **Missing Validation at Trust Boundaries**: Consuming data from the network, backups, external interfaces, files, UI, or IPC without validating type, length, format, and range before use. | ||
| - **Untrusted Data in Queries**: Concatenating untrusted input into SQL or other queries instead of using parameterized APIs. |
There was a problem hiding this comment.
| - **Untrusted Data in Queries**: Concatenating untrusted input into SQL or other queries instead of using parameterized APIs. | |
| - **Untrusted Data in Queries**: Concatenating untrusted input into queries like SQL queries instead of using parameterized APIs. |
|
|
||
| - **Missing Validation at Trust Boundaries**: Consuming data from the network, backups, external interfaces, files, UI, or IPC without validating type, length, format, and range before use. | ||
| - **Untrusted Data in Queries**: Concatenating untrusted input into SQL or other queries instead of using parameterized APIs. | ||
| - **Untrusted Paths and Archives**: Using externally supplied file names or paths (e.g. from content providers or zip entries) without canonicalization and containment checks. |
There was a problem hiding this comment.
| - **Untrusted Paths and Archives**: Using externally supplied file names or paths (e.g. from content providers or zip entries) without canonicalization and containment checks. | |
| - **Untrusted Paths and Archives**: Using externally supplied file names or paths (e.g. from ZIP entries) without canonicalization and containment checks. |
|
|
||
| ## Mitigations | ||
|
|
||
| - **Validate at Every Trust Boundary**: Treat all externally originated data as untrusted, including data received over TLS or restored from backups, and validate it against strict expectations before use. |
There was a problem hiding this comment.
| - **Validate at Every Trust Boundary**: Treat all externally originated data as untrusted, including data received over TLS or restored from backups, and validate it against strict expectations before use. | |
| - **Validate at Every Trust Boundary**: Treat all externally originated data as untrusted and validate it against strict expectations before use. |
| ## Mitigations | ||
|
|
||
| - **Validate at Every Trust Boundary**: Treat all externally originated data as untrusted, including data received over TLS or restored from backups, and validate it against strict expectations before use. | ||
| - **Use Parameterized Queries**: Access databases exclusively through parameterized or prepared statements; never build queries by concatenating untrusted input. |
There was a problem hiding this comment.
| - **Use Parameterized Queries**: Access databases exclusively through parameterized or prepared statements; never build queries by concatenating untrusted input. | |
| - **Use Parameterized Queries**: Access databases exclusively through parameterized or prepared statements. Do not build queries by concatenating untrusted input. |
|
|
||
| - **Validate at Every Trust Boundary**: Treat all externally originated data as untrusted, including data received over TLS or restored from backups, and validate it against strict expectations before use. | ||
| - **Use Parameterized Queries**: Access databases exclusively through parameterized or prepared statements; never build queries by concatenating untrusted input. | ||
| - **Canonicalize and Contain Paths**: Canonicalize externally supplied file names and paths and verify they resolve inside the intended directory before any file operation, including when extracting archives. |
There was a problem hiding this comment.
| - **Canonicalize and Contain Paths**: Canonicalize externally supplied file names and paths and verify they resolve inside the intended directory before any file operation, including when extracting archives. | |
| - **Canonicalize and Contain Paths**: Canonicalize externally supplied file names and paths and verify they resolve inside the intended directory before any file operation. |
Co-authored-by: Jan Seredynski <janseredynski@gmail.com>
Co-authored-by: Jan Seredynski <janseredynski@gmail.com>
| - **Weak Keychain Access Control Flags**: Protecting Keychain items with flags that do not enforce the intended factor (e.g. `kSecAccessControlTouchIDAny` without additional constraints) or storing "protected" data retrievable without authentication. | ||
| - **Insecure Device-Credential Fallback**: Implementing Confirm Credentials or similar flows with long authentication validity durations or without binding them to keystore keys. | ||
| - **Local-Only Enforcement**: Enforcing authentication or authorization decisions solely in client code for apps that have a backend, instead of validating them server-side. | ||
| - **Custom Credentials Not Keystore-Bound**: Implementing a custom app PIN or password as a plain comparison in code instead of binding it to the platform keystore (e.g. via the Keychain's `applicationPassword` access control). |
There was a problem hiding this comment.
| - **Custom Credentials Not Keystore-Bound**: Implementing a custom app PIN or password as a plain comparison in code instead of binding it to the platform keystore (e.g. via the Keychain's `applicationPassword` access control). | |
| - **No Brute-Force Resistance**: Allowing unlimited attempts against a custom PIN or password because the app does not track failures. | |
| - **Custom Credentials Hardcoded**: Implementing a custom app PIN or password as a plain comparison in code. |
| - **Use Strict Access Control Flags**: Choose Keychain and keystore parameters that enforce the intended factor and invalidate on enrollment changes (see @MASWE-0023), avoiding weak flags and long authentication validity windows. | ||
| - **Enforce Authentication Server-Side**: For connected apps, gate server resources on server-verified evidence of authentication (e.g. a signed challenge produced with an authentication-bound key), never on a client-side boolean. | ||
| - **Bind Custom Credentials to the Keystore**: Implement custom PINs or passwords via keystore- or Keychain-backed mechanisms (e.g. `applicationPassword`) instead of comparing values in app code. | ||
| - **Require Explicit User Action**: For passive modalities such as face recognition, require explicit confirmation of the authentication prompt before proceeding with sensitive operations. |
There was a problem hiding this comment.
| - **Require Explicit User Action**: For passive modalities such as face recognition, require explicit confirmation of the authentication prompt before proceeding with sensitive operations. | |
| - **Require Explicit User Action**: For passive modalities such as face recognition, require explicit confirmation of the authentication prompt before proceeding with sensitive operations. | |
| - **Resist Credential Guessing**: Keep each attempt dependent on hardware-backed key material so guesses cannot be parallelised off-device, and combine app-defined credentials with a biometric or device-credential constraint so every attempt also requires an OS-throttled factor. |
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
|
|
||
| - **Avoid the Clipboard for Secrets**: Disable copying for sensitive fields and provide secure alternatives such as auto-fill (see @MASWE-0024) so users never need to copy secrets. | ||
| - **Mark Clipboard Content as Sensitive**: When sensitive content must be copied, flag it as sensitive so the platform masks previews and treats it accordingly. | ||
| - **Restrict Clipboard Scope and Lifetime**: Keep sensitive clipboard items local to the device, set expirations where supported, and clear the clipboard once the data has been used. |
There was a problem hiding this comment.
| - **Restrict Clipboard Scope and Lifetime**: Keep sensitive clipboard items local to the device, set expirations where supported, and clear the clipboard once the data has been used. | |
| - **Restrict Clipboard Exposure**: Prevent copying sensitive values when it is not required for the intended functionality. When copying is a legitimate feature, follow the platform's [secure clipboard handling guidance on Android](https://developer.android.com/privacy-and-security/risks/secure-clipboard-handling) and mark the content using [`ClipDescription.EXTRA_IS_SENSITIVE`](https://developer.android.com/reference/android/content/ClipDescription#EXTRA_IS_SENSITIVE) to obscure clipboard previews. On iOS, use pasteboard options such as [`localOnly`](https://developer.apple.com/documentation/uikit/uipasteboard/optionskey/localonly) and [`expirationDate`](https://developer.apple.com/documentation/uikit/uipasteboard/optionskey/expirationdate) to limit cross-device propagation and content lifetime. These mechanisms reduce exposure but do not provide access control over clipboard contents. |
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Stefan <s.bernhardsgruetter@proton.me>
Co-authored-by: Sergio García <32015541+sgIOlas@users.noreply.github.com>
This PR applies the v1.0.0-rc remapping: every weakness gets a new, stable ID (and usually a new title), old IDs are consolidated or retired, and several brand new weaknesses are introduced. It also brings all weaknesses up to a single, consistent authoring standard (no placeholders left) and adds a few new metadata fields.
Check the CSV with the mappings from beta to v1.0.0 RC: maswe.csv
Result: 77 weaknesses (was 119), organized as:
All 77 weaknesses are now
status: new— there are no remainingplaceholderordraftentries.1. ID remapping
MASWE-0031→ newMASWE-0019).their old ID is preserved in that file's
mappings.maswe-betalist (see §4).MASWE-0039— Sensitive Data Leaked via Accessibility ServicesMASWE-0074— Usage of Non-Privacy-Preserving FunctionalityMASWE-0075— Malicious Code Included in the AppMASWE-0076— Malware Detection Not ImplementedMASWE-0077— Non-Reproducible Builds2. Content changes
Every renamed file got its
id/titleupdated to match the new scheme.Editorial merges: where multiple old weaknesses were consolidated into one, the new file's
prose (Overview / Modes of Introduction / Mitigations) was rewritten to cover the union of the
original content — not just the primary predecessor. Notable consolidations:
MASWE-0011(Improper Encryption) — absorbs IV misuse, key reuse, and risky paddingMASWE-0020(Lack of Authentication/Authorization on App Components) — absorbs services,broadcast receivers, content providers, activities, unauthenticated IPC, and more
MASWE-0024(Lack of Auto-fill Support for Authenticators) — absorbs passwordless auth,shared web credentials, and platform auth-API usage
MASWE-0047(Using Non-Standard APIs for Security-Critical Functionality) — absorbs riskycrypto, non-proven networking APIs, and non-standard auth; broadened to also cover apps that
fail to leverage secure platform functionality (e.g. custom DNS vs. Private DNS)
MASWE-0048(Unsafe Handling of Untrusted Data) — absorbs the entire "unsafe handling of datafrom X" family (network, backups, external interfaces, local storage, UI, IPC) plus SQLi,
parsing/escaping, and deserialization
MASWE-0054(Debug Artifacts Not Removed) — absorbs non-production resources, debuggingsymbols, and code that disables security controls; clarified against
MASWE-0006(whichcovers leaked leftovers vs.
0054's debug/resilience artifacts)MASWE-0062(App Attestation Not Implemented) — repositioned from "Official StoreVerification" to app-signature/attestation-based integrity checking
0007,0013,0021,0025,0035,0038,0050,0056,0058,0071,etc.) — smaller merges, see individual files'
mappings.maswe-betaPlaceholder finalization: every previously
status: placeholderweakness (54 of them) hasbeen fully written and promoted to
status: new, and the temporarydraftmetadata block(
draft.description/draft.topics) has been removed. Drafting drew on the related MASTG-TESTand MASTG-BEST content to keep the Modes of Introduction and Mitigations grounded in what is
actually testable and actionable.
Full standardization: every weakness now follows the authoring standard defined in
.github/instructions/maswe.instructions.md:## Overview,## Modes of Introduction,## Impact,## Mitigations(previously some pages ordered Impact before Modes ofIntroduction).
## Overviewopens with a single-sentence definition in the form " occurs when …".## Modes of Introductiondescribes only developer-introduced, testable causes (consequenceswere moved out to
## Impact); each bullet uses a bold short label.## Mitigationsare actionable, imperative bullets with bold short labels.New threat and attack model: what an attacker achieves, and how, is no longer written as prose
in each weakness. It is expressed as structured, ID-referenced frontmatter drawn from two new
enumerations under
.github/instructions/:threats.yaml: the closed set ofMAS-THREAT-XXXXoutcomes (e.g.MAS-THREAT-0001:"Attackers can access sensitive data written to logs."), referenced by the new
threat:field.77 threats, one per weakness.
attacks.yaml: the closed set ofMAS-ATTACK-XXXXpaths through which a threat is realized(e.g.
MAS-ATTACK-0001: "Obtaining the app package and reverse engineering it."), referencedby the new
attacks: [MAS-ATTACK-XXXX, ...]field, IDs in ascending order. 89 attacks, reusedacross weaknesses — an average of two per weakness, and every one of the 89 is used at least
once.
Both enumerations are append-only: IDs are never reused or renumbered, so they are stable
identifiers that MASTG content and external consumers can reference directly.
Standardized Impact model: with the outcome and attack paths moved to frontmatter,
## Impactnow contains only the consequences — a flat bulleted list, each opening with a canonical label
from the new
.github/instructions/impact.yaml(Compromise of Sensitive Data, Authenticationor Authorization Bypass, Bypass of Protection Mechanisms, Execution of Unauthorized Code,
Financial Loss, Compromise of System Integrity and Business Operations, Violation of User
Privacy, Loss of User Trust, Legal and Regulatory Non-Compliance) and closing with a
resulting in clause. Unlike threats and attacks, impact labels are a fixed vocabulary and carry
no IDs. Equivalent consequences share identical wording across weaknesses.
Cross-references between related weaknesses added/fixed using the
@MASWE-XXXXconvention (e.g.MASWE-0047↔MASWE-0074now note their intentional security/privacy overlap).3. Frontmatter/metadata changes
requirement: added to all 77 weaknesses — a single normative sentence (e.g. "The appexcludes sensitive data from application logs.") suitable for use as a testable requirement
statement, positioned right after
alias. Now documented as a required field in the authoringinstructions.
threat/attacks(new fields): added to all 77 weaknesses, positioned right afterprofiles.threatis a singleMAS-THREAT-XXXXID naming the outcome attackers achieve;attacksis a list ofMAS-ATTACK-XXXXIDs (ascending order) naming the paths to it. Bothreference the new
threats.yaml/attacks.yamlvocabularies described in §2. Documented asrequired fields in the authoring instructions.
mappings.maswe-beta: records which old (pre-1.0.0-rc, "beta") MASWE IDs are covered by thisweakness, for traceability. This started as a top-level
beta-coveragefield and was later movedinto
mappingsand renamed tomaswe-betafor consistency with the other mapping fields.mappings.masvs-v2audit: after the mechanical rename, everymasvs-v2control list waschecked against the actual control definitions (
../masvs/controls/*.md) and against anever-lose-a-mapping audit of all 119 predecessor files:
MASWE-0020gainedCWE-287back after review).MASWE-0025droppedMASVS-AUTH-1,MASWE-0048droppedMASVS-PLATFORM-1/-3) — see commit93f0d95for thefull rationale per file.
mappings.android-risks: reviewed all existing links againsthttps://developer.android.com/privacy-and-security/risks and added the risk to 12 weaknesses that were
missing it. All 44 risks on that page are now mapped to at least one MASWE; a few required
judgment calls that were subsequently refined (e.g.
bad-dns→MASWE-0047, broadened to alsocover under-use of platform-provided secure functionality;
unsafe-download-manager→MASWE-0041;use-of-native-code→MASWE-0045andMASWE-0048). The values were alsosimplified from full URLs to the short risk identifiers (e.g.
log-info-disclosureinstead ofhttps://developer.android.com/privacy-and-security/risks/log-info-disclosure), which the siterenders from.
mappings.android-core-app-quality(new field): added to 25 Android-relevant weaknesses,linking each to the matching item(s) in the
Android Core App Quality checklist.
Values use the current named IDs (e.g.
Network_Security_Traffic,Minimize_Permissions,Cryptographic_Algorithms), and the two pre-existing legacy-style mappings (SC-*/PS-*numbering) were migrated to the named IDs. Every checklist item in the "Privacy and security"
section is now covered by at least one weakness. The field is documented in the authoring
instructions and is only used when
platformincludesandroid.4. Traceability
Every new weakness's
mappings.maswe-betafield lists the old MASWE ID(s) it supersedes orabsorbs, so old-ID → new-ID mapping (and content lineage for merged weaknesses) is fully
recoverable from the files themselves, independent of git history.
Verification performed
id:fields match their filename; no duplicate IDs.status: new; noplaceholder/draftentries and no leftoverdraft:metadata blocks.
## Overviewopenswith an "… occurs when …" definition.
threat:resolves to an entry inthreats.yamland everyattacks:ID resolvesto an entry in
attacks.yaml; every## Impactconsequence uses a label from the canonicalimpact.yamlset.status: deprecated/covered_by/deprecation_notemetadata left behind.cwe/masvs-v1/masvs-v2mappings across all 119 predecessor files (fullaudit script run against git history).
Android Core App Quality checklist item are covered by at least one MASWE.