Skip to content

fix: Bump @parse/node-apn from 8.1.0 to 8.1.1 - #639

Merged
mtrezza merged 1 commit into
parse-community:masterfrom
mtrezza:fix/parse-node-apn-8.1.1
Oct 28, 2026
Merged

mtrezza merged 1 commit into
parse-community:masterfrom
mtrezza:fix/parse-node-apn-8.1.1

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Security

  • Alert 251 (high, runtime): GHSA-86w9-cpqp-85rv / CVE-2026-85393, "node-forge RSA PKCS#1 v1.5 signature verification accepts extra nested DigestAlgorithm elements", vulnerable range <= 1.4.0, no patched version listed. node-forge 1.4.0 is a single hoisted lock entry (node_modules/node-forge) shared by @parse/node-apn 8.1.0 (exact pin) and firebase-admin 13.9.0 (^1.4.0). @parse/node-apn 8.1.1 pins node-forge 1.4.2, which is outside the vulnerable range, and firebase-admin dedupes onto the same copy, so the alert resolves.
  • Neither caller verifies signatures, so the vulnerable path isn't reached and this upgrade is hardening. @parse/node-apn uses node-forge only to parse certificate-based credentials (cert, key, pfx); token-based (.p8) authentication doesn't use it. firebase-admin calls only forge.pki.privateKeyFromPem(), to validate the service account's private_key in cert().

Changes

@parse/node-apn 8.1.1

  • Bump node-forge from 1.4.0 to 1.4.2 (fix: Bump node-forge from 1.4.0 to 1.4.2 node-apn#232). This is the only release note. The published 8.1.0 and 8.1.1 tarballs differ only in the version, the node-forge pin, the changelog entry, and a mocha devDependency bump (10.7.3 → 12.0.3) that dependents don't install. No library code changed.

node-forge 1.4.2

  • pem.decode() converts non-string input such as a Buffer to a string again, as before 1.4.1. node-apn passes Buffers when cert and key are file paths or Buffers; 1.4.1 alone threw TypeError: str.charAt is not a function there.

node-forge 1.4.1 (security release, 17 advisories)

Reached through credential parsing (node-apn's PEM, PKCS#12 and encrypted key parsing; firebase-admin's PEM private key parsing):

  • HIGH: Regular expression denial of service in PEM decoding (GHSA-7wch-p9px-956x). PEM messages are found in linear time. They match as before, except that a BEGIN line's label is the shortest one followed by -----.
  • HIGH: ASN.1 resource exhaustion via BIT STRING decoding (GHSA-rhr8-3pm8-cq29). asn1.fromDer() applies maxDepth inside BIT STRINGs and decodes only one level of them.
  • HIGH: PKCS#12 MAC forgery due to a missing iteration count check (GHSA-jc66-7q78-782g). Iteration counts below 1 are rejected.
  • LOW: Incomplete PKCS#7 padding validation in CBC and ECB decryption (GHSA-2vgq-wchc-25w7), used when decrypting encrypted PEM keys and PKCS#12 contents.
  • [asn1] A multi-byte first OID subidentifier (e.g. 2.999) is encoded and decoded in base 128 (Fix encoding/decoding of multi-byte first OID subidentifier digitalbazaar/forge#1148). This changes asn1.derToOid(), which the credential parsers use to read OIDs (certificate extensions and names, PKCS#12 bag types, encryption algorithms). OIDs from 2.40 upward used to decode wrongly (2.40 as 3.0, 2.999 as 3.16.55) and now decode correctly. This has no effect here: every OID with a first subidentifier below 120 (all of 0.x, 1.x and 2.0 to 2.39) decodes exactly as before. That includes the OIDs both callers check, whose first subidentifier is 42: Apple's push certificate extensions 1.2.840.113635.100.6.3.1 and .2, rsaEncryption, pkcs8ShroudedKeyBag and certBag.

Not reached, because neither caller verifies signatures or certificate chains, encodes OIDs, or uses forge's TLS, AES-GCM, HTTP client or RSA key generation:

  • HIGH: RSA-PKCS signature forgery via an extra DigestAlgorithm field (CVE-2026-85393, alert 251) and via non-canonical DigestInfo encoding (GHSA-6qrw-m8cv-hcxf).
  • HIGH: TLS record processing denial of service via call stack exhaustion (GHSA-hqq3-7jhf-c5jx) and via an interleaved record during a fragmented handshake message (GHSA-8hrf-8g6f-7xwp).
  • HIGH: basicConstraints bypass via deprecated extension OIDs in certificate chain verification (GHSA-5x38-2vff-x55p).
  • MODERATE: TLS client denial of service when the server sends no certificate (GHSA-525v-9gp9-w22h), pathLenConstraint bypass in certificate chain verification (GHSA-h46v-rmh6-fq4f), AES-GCM authentication bypass with an invalid tag length (GHSA-5cwg-6vw7-rj6p), and prototype pollution via Set-Cookie in forge.http (GHSA-6wvx-3r32-xmcg).
  • LOW: ASN.1 OID first arc truncation (GHSA-4642-5mcj-2rqw). This fix is in asn1.oidToDer(), the encoding side, which neither caller reaches.
  • LOW: Certificate signature verified with the issuer's signature scheme (GHSA-9wg5-mj3p-v49q), certificate chain verification removing trusted certificates from the CA store (GHSA-4487-j8r4-4g2f), and denial of service in BigInteger.modInverse() with negative inputs (GHSA-h6cr-wjv9-3cpp).
  • TLS heartbeat requests received before the first handshake is complete are ignored.

Compatibility check

  • fix: Bump node-forge from 1.4.0 to 1.4.2 node-apn#232 ran node-apn's credential parsing with node-forge 1.4.0 and 1.4.2 in 884 cases, covering file paths, Buffers, inline PEM and PFX, formatting variants, wrong passphrases and malformed input. Every valid input gave identical results. All differences were on error paths, in the stricter direction.
  • firebase-admin's call was compared the same way: forge.pki.privateKeyFromPem() on a string, with its Failed to parse private key: … error wrapping, under node-forge 1.4.0 and 1.4.2. The inputs were keys generated with OpenSSL 3.6 and the key in spec/support/fakeServiceAccount.json.
Input Cases Identical Differences
RSA-2048 and RSA-4096 PKCS#8 keys (the service account format), an RSA-2048 PKCS#1 key and the fakeServiceAccount.json key, each in 16 formatting variants (CRLF, CR, trailing spaces, leading Bag Attributes text, trailing text, leading blank lines, indentation with spaces or tabs, single-line and re-wrapped bodies, two keys, a certificate before the key, literal \n escapes) 64 64 None. 56 parse in both versions; 8 fail in both with the same message
Malformed or unsupported input: truncated body, missing END line, mismatched, lowercase or dashed labels, invalid base64, random DER, empty body, certificate only, EC and Ed25519 keys, encrypted keys, non-PEM strings, a 2,000-character label 20 19 1: a label containing ----- now reports Invalid PEM formatted message. instead of a wrong PEM type error. Both versions reject it

Parent API

src/APNS.js uses new apn.Provider(), the provider's send() and new apn.Notification(). node-apn's library code is identical in 8.1.0 and 8.1.1. src/FCM.js reaches node-forge only through cert() from firebase-admin/app, covered above. push-adapter doesn't match on any credential error message.

Lock file

  • @parse/node-apn 8.1.0 → 8.1.1
  • node-forge 1.4.0 → 1.4.2, still a single copy

No other entries change.

Breaking Changes

None

Code Changes Required

None. Only package.json and package-lock.json change.

Summary by CodeRabbit

  • Maintenance
    • Updated the Apple push notification package and its security-related dependency.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 66ae2cb6-4a19-4b6f-b981-2700319ed8c8
Commits

Reviewing files that changed from the base of the PR and between 3b04d13 and 7a191c1.

Files selected for processing: 2
  • package-lock.json
  • package.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Walkthrough

The package manifest and lockfile update @parse/node-apn from 8.1.0 to 8.1.1. The lockfile also updates its node-forge dependency from 1.4.0 to 1.4.2.

Changes: APN dependency update

Layer / File(s) Summary
Update APN dependency versions
package.json, package-lock.json
@parse/node-apn is updated to 8.1.1. The lockfile updates node-forge to 1.4.2 and refreshes the related registry URLs, integrity hashes, and dependency references.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: Minimal · up to 7a191

The dependency update is internally consistent and presents no supported merge-blocking risk.

Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title begins with the required fix: prefix and clearly describes the dependency update. The first word after the prefix is capitalized.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Check Passed The pull request changes only dependency metadata. It upgrades @parse/node-apn from 8.1.0 to 8.1.1 and the single hoisted node-forge entry from 1.4.0 to 1.4.2. No application code, scripts, permis…
Engage In Review Feedback Passed PASS: The current review produced zero actionable findings, and no CodeRabbit review threads were returned. No review feedback required engagement, implementation, or discussion.
Description check Passed The description is detailed and clearly explains the security issue, dependency changes, compatibility checks, impact, and lack of breaking changes. It does not use the template's explicit Issue, Appr…
Full details: Security Check

Explanation

The pull request changes only dependency metadata. It upgrades @parse/node-apn from 8.1.0 to 8.1.1 and the single hoisted node-forge entry from 1.4.0 to 1.4.2. No application code, scripts, permissions, or runtime security patterns changed. The lockfile uses registry URLs and integrity hashes for both updated packages.

Full details: Description check

Explanation

The description is detailed and clearly explains the security issue, dependency changes, compatibility checks, impact, and lack of breaking changes. It does not use the template's explicit Issue, Approach, and Tasks headings, and it does not state the task checklist status, but the required information is substantially covered.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.18%. Comparing base (79ddd57) to head (7a191c1).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #639   +/-   ##
=======================================
  Coverage   99.18%   99.18%           
=======================================
  Files          11       11           
  Lines        1841     1841           
=======================================
  Hits         1826     1826           
  Misses         15       15           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mtrezza
mtrezza merged commit 9ca05f9 into parse-community:master Oct 28, 2026
9 checks passed
@mtrezza
mtrezza deleted the fix/parse-node-apn-8.1.1 branch October 28, 2026 15:30
parseplatformorg pushed a commit that referenced this pull request Oct 28, 2026
## [8.5.10](8.5.9...8.5.10) (2026-10-28)

### Bug Fixes

* Bump @parse/node-apn from 8.1.0 to 8.1.1 ([#639](#639)) ([9ca05f9](9ca05f9))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 8.5.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants