Skip to content

Remove HTML::Parser from what is shared to PG. - #3166

Open
drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:more-pg-vulnerabilities
Open

Remove HTML::Parser from what is shared to PG.#3166
drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:more-pg-vulnerabilities

Conversation

@drgrice1

@drgrice1 drgrice1 commented Aug 23, 2026

Copy link
Copy Markdown
Member

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.

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 the DynaLoader package 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 then DBD::MariaDB which also uses it fails. The issue with DynaLoader is fixed.

@drgrice1
drgrice1 force-pushed the more-pg-vulnerabilities branch from 7b633a1 to 9e0af39 Compare August 23, 2026 21:41
`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
drgrice1 force-pushed the more-pg-vulnerabilities branch from 9e0af39 to ad051fd Compare August 23, 2026 21:59
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.

1 participant