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.
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:
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.