Skip to content
Path traversal Write-up Intermediate

Drupal H5P Module <= 2.0.0 (isValidPackage) Zip Slip Vulnerability

The H5P validator skips files or folders starting with a dot or underscore in the uploaded archive; a crafted archive may bypass this and write files outside the intended directory.

Egidio Romano Follow

Published on karmainsecurity.com

The vulnerability is located within the H5PValidator::isValidPackage() method. This implements the following check in order to skip any file or folder starting with a dot or underscore within the uploaded h5p archive:

Egidio Romano / EgiX, on karmainsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Impact

A crafted archive may bypass the dot/underscore skip check and write files outside the intended directory.

What the attacker needed

Ability to upload an h5p archive

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 write-up has not been written yet. The Original tab links to the source.

When you upload an h5p archive, the server unpacks it. The validator tries to skip files or folders starting with a dot or underscore, but a crafted archive may get past this and write files outside the intended folder.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by Egidio Romano

View all

5 more disclosed reports, best first.

More from Drupal

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.