Skip to content
Memory corruption Disclosed report Advanced CVE-2020-7068

Use after free vulnerability in phar_parse_zipfile

A malformed phar archive with a crafted cache configuration caused a freed memory region to be used as a hash key when inserted into the alias hash table. An attacker could potentially gain memory information through this use-after-free.

grigoritchy Follow

Originally disclosed on HackerOne

  • Triaged in 18 hours
  • Fixed in 2 months
  • Paid in 2 months
  • Disclosed after 3 months

Malformed phar file with cache configuration leads freed memory as hash key when it inserts into the hash table.

More detail information and original report is here: https://bugs.php.net/bug.php?id=79797 and it was assigned CVE-2020-7068.

Impact

Through this vulnerability that inserts freed memory into the hash table that manages alias file names, an attacker may gain memory information.

The original report as published on HackerOne, by grigoritchy. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the phar ZIP parser inserted a pointer to freed memory into the alias hash table without keeping that memory alive.

Impact

An attacker may gain memory information, though the text does not claim code execution or a full compromise.

What the attacker needed

Attacker can supply a malformed phar file

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A phar file is a PHP archive bundling many files. A crafted archive could make the program use memory after it was freed, a use-after-free, which may let an attacker gain memory information.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by grigoritchy

View all

11 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.