P30 FirmwareOperating system · Huawei

CVE-2021-22331

HIGH · 7.5 CVSS v3.1 Published 2021-04-28
Fix available
A fix is available. Upgrade to 10.1.0.165 / 11.0.0.118 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
There is a JavaScript injection vulnerability in certain Huawei smartphones. A module does not verify some inputs sufficiently. Attackers can exploit this vulnerability by sending a malicious application request to launch JavaScript injection. This may compromise normal service. Affected product versions include HUAWEI P30 versions earlier than 10.1.0.165(C01E165R2P11), 11.0.0.118(C635E2R1P3), 11.0.0.120(C00E120R2P5), 11.0.0.138(C10E4R5P3), 11.0.0.138(C185E4R7P3), 11.0.0.138(C432E8R2P3), 11.0.0.138(C461E4R3P3), 11.0.0.138(C605E4R1P3), and 11.0.0.138(C636E4R3P3).

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

JavaScript injection vulnerability in Huawei P30 smartphones where a module fails to properly validate certain inputs. Attackers can exploit this by sending malicious application requests to inject and execute arbitrary JavaScript code, potentially compromising device services.

MitigationUpdate Huawei P30 to the patched firmware versions: 10.1.0.165(C01E165R2P11) or respective 11.0.x builds (C635E2R1P3, C00E120R2P5, or C10E4R5P3/C185E4R7P3/C432E8R2P3/C461E4R3P3/C605E4R1P3/C636E4R3P3).

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
P30 FirmwareOperating system
Affected:< 10.1.0.165\(c01e165r2p11\)< 11.0.0.118\(c635e2r1p3\)< 11.0.0.120\(c00e120r2p5\)< 11.0.0.138\(c10e4r5p3\)< 11.0.0.138\(c185e4r7p3\)< 11.0.0.138\(c432e8r2p3\)< 11.0.0.138\(c461e4r3p3\)< 11.0.0.138\(c605e4r1p3\)< 11.0.0.138\(c636e4r3p3\)

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify device model
    Go to Settings > About Phone > Model Number and verify the device is Huawei P30
    Affected if Device model is not Huawei P30 - this CVE only affects P30 smartphones
  2. Check firmware build number
    Go to Settings > About Phone > Build Number to view the current firmware build (e.g., C01E165R2P11)
    Affected if Build number cannot be read or device is not a Huawei P30
  3. Compare build to affected versions
    Compare your build number against the list: 10.1.0.165(C01E165R2P11), 11.0.0.118(C635E2R1P3), 11.0.0.120(C00E120R2P5), or 11.0.0.138 with any of these suffixes: C10E4R5P3, C185E4R7P3, C432E8R2P3, C461E4R3P3, C605E4R1P3, C636E4R3P3
    Affected if Your firmware version is lower than any of these patched builds - the device is running a vulnerable version

If the Huawei P30 firmware build number is below the patched versions listed, the device is affected by this JavaScript injection vulnerability.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 10.1.0.165 / 11.0.0.118 / 11.0.0.120 or later
Fixed in 10.1.0.16511.0.0.11811.0.0.120
Interim mitigation

Update Huawei P30 to the patched firmware versions: 10.1.0.165(C01E165R2P11) or respective 11.0.x builds (C635E2R1P3, C00E120R2P5, or C10E4R5P3/C185E4R7P3/C432E8R2P3/C461E4R3P3/C605E4R1P3/C636E4R3P3).

Fix this in P30 Firmware Scoped from the published advisory
  • Consultation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
5.0 hours of engineering $880
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,408.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-22331 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-22331 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data