xml2rfc is vulnerable to arbitrary file reads through prepped files
### Impact
When generating PDF files, this vulnerability allows an attacker to read arbitrary files from the filesystem by injecting malicious link element into the prepped RFCXML.
### Workarounds
Test untrusted input with `link` elements with `rel="attachment"` before processing.
### References
This is related to [GHSA-cfmv-h8fx-85m7](https://github.com/ietf-tools/xml2rfc/security/advisories/GHSA-cfmv-h8fx-85m7).
### Impact
When generating PDF files, this vulnerability allows an attacker to read arbitrary files from the filesystem by injecting malicious link element into the XML.
### Workarounds
Test untrusted input with `link` elements with `rel="attachment"` before processing.
### Credits
This vulnerability was reported by Mohamed Ouad from [Doyensec](https://doyensec.com/).
Version [3.12.0](https://github.com/ietf-tools/xml2rfc/blob/main/CHANGELOG.md#3120---2021-12-08) changed `xml2rfc` so that it would not access local files without the presence of its new `--allow-local-file-access` flag.
This prevented XML External Entity (XXE) injection attacks with `xinclude` and XML entity references.
It was discovered that `xml2rfc` does not respect `--allow-local-file-access` when a local file is specified as `src` in `artwork` or `sourcecode` elements. Furthermore, XML entity references can include any file inside the source dir and below without using the `--allow-local-file-access` flag.
The `xml2rfc <= 3.26.0` beh
SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc
xml2rfc allows `script` elements in SVG sources.
In HTML output having these script elements can lead to XSS attacks.
Sample XML snippet:
```
<artwork type="svg" src="data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cscript%3E window.alert('Test Alert'); %3C/script%3E%3C/svg%3E">
</artwork>
```
### Impact
This vulnerability impacts website that publish HTML drafts and RFCs.
### Patches
This has been fixed in version [3.12.4](https://github.com/ietf-tools/xml2rfc/releases/tag/v3.12.4).
### Workarounds
If SVG source is self-contained within the XML, scraping `script` elements from SVG files.
### Referenc