Remove HTML::Parser from what is shared to PG. - #3166
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
drgrice1
force-pushed
the
more-pg-vulnerabilities
branch
from
August 23, 2026 21:41
7b633a1 to
9e0af39
Compare
`HTML::Parser` was shared into the safe compartment, and its `parse_file` method opens and reads whatever path it is given, bypassing the permitted_read_dir restriction. Thus giving any PG problem arbitrary file read. It is not actually used by PG, and so that is removed from the modules that are shared. Note that the `HTML::Entities` package which is part of the `HTML::Parser` package on CPAN is still shared and is used.
drgrice1
force-pushed
the
more-pg-vulnerabilities
branch
from
August 23, 2026 21:59
9e0af39 to
ad051fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTML::Parserwas shared into the safe compartment, and itsparse_filemethod opens and reads whatever path it is given, bypassing the permitted_read_dir restriction. Thus giving any PG problem arbitrary file read. It is not actually used by PG, and so that is removed from the modules that are shared. Note that theHTML::Entitiespackage which is part of theHTML::Parserpackage on CPAN is still shared and is used.This is paired with openwebwork/pg#1523. Note that this is independent of #3164 (since it doesn't conflict with that one).
Actually, this does depend on #3164. If theThe issue withDynaLoaderpackage is still shared to the safe compartment, then things go quite wonky with webwork2. The global package gets emptied by what PG now does with it, and thenDBD::MariaDBwhich also uses it fails.DynaLoaderis fixed.