Skip to content

rtfobj: detect CVE-2025-21298#887

Open
stzifkas wants to merge 1 commit into
decalage2:masterfrom
stzifkas:issue-883-cve-2025-21298
Open

rtfobj: detect CVE-2025-21298#887
stzifkas wants to merge 1 commit into
decalage2:masterfrom
stzifkas:issue-883-cve-2025-21298

Conversation

@stzifkas

@stzifkas stzifkas commented Jun 4, 2026

Copy link
Copy Markdown

Fixes #883
Detects malformed embedded StaticDib OLE objects in RTF files matching the public CVE-2025-21298 PoC.
Test plan:

  • python -m unittest discover -v tests/rtfobj
  • rtfobj tests/test-data/rtfobj/cve-2025-21298-poc.rtf shows CVE warning

Add is_cve_2025_21298_indicator() and warn in process_file when an
embedded StaticDib object has non-DIB stub data matching the public
PoC (issue decalage2#883). Includes unit tests and the PoC RTF sample.
@decalage2

Copy link
Copy Markdown
Owner

Hello, thanks a lot for this contribution!
Did you check if the RTF test file triggers some antivirus engines, by any chance?

@stzifkas

stzifkas commented Jun 12, 2026

Copy link
Copy Markdown
Author

Checked on VirusTotal: 28/75 engines flag it, all specifically for CVE-2025-21298 (Kaspersky, Microsoft, BitDefender, Avast, TrendMicro, etc.). So yes, it will trip AV.

Fix options:

  1. Base64-encode the RTF and decode it at test runtime inside the .py fixture (which seems to be the cleanest)
  2. XOR the bytes with a known key
  3. Store it as a .bin with a comment pointing to the VT result.

Happy to rework the test file approach whichever way you prefer.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtfobj - detect CVE-2025-21298

2 participants