
PDF.js Viewer Security & Risk Analysis
wordpress.org/plugins/pdfjs-viewer-shortcodeEmbed a beautiful PDF viewer into pages.
Is PDF.js Viewer Safe to Use in 2026?
Generally Safe
Score 99/100PDF.js Viewer has a strong security track record. Known vulnerabilities have been patched promptly.
The pdfjs-viewer-shortcode plugin, version 3.0.2, exhibits a mixed security posture. While the plugin demonstrates good practices such as a limited attack surface with all identified entry points protected by authentication and a significant percentage of output escaping, there are notable areas of concern. The presence of SQL queries without prepared statements is a significant risk, as it can lead to SQL injection vulnerabilities if the data is not properly sanitized. Furthermore, the taint analysis revealing a flow with unsanitized paths, even without a critical or high severity rating, indicates a potential for subtle vulnerabilities that might not be immediately obvious. The plugin's vulnerability history, with two known medium-severity Cross-Site Scripting (XSS) vulnerabilities, the most recent being in early 2023, suggests a recurring pattern of input validation issues. Although there are no currently unpatched CVEs, this history necessitates ongoing vigilance. In conclusion, while the plugin benefits from a well-controlled attack surface and good output escaping, the unescaped SQL queries and the identified unsanitized path flow, coupled with past XSS issues, warrant caution and suggest that further hardening of input handling is advisable.
Key Concerns
- SQL queries not using prepared statements
- Flow with unsanitized paths identified
- Medium severity XSS vulnerabilities in history
PDF.js Viewer Security Vulnerabilities
CVEs by Year
Severity Breakdown
2 total CVEs
PDF.js Viewer <= 2.1.7 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode
PDF.js Viewer <= 2.0.1 - Authenticated (Contributor+) Stored Cross-Site Scripting
PDF.js Viewer Code Analysis
SQL Query Safety
Output Escaping
Data Flow Analysis
PDF.js Viewer Attack Surface
AJAX Handlers 1
Shortcodes 1
WordPress Hooks 23
Maintenance & Trust
PDF.js Viewer Maintenance & Trust
Maintenance Signals
Community Trust
PDF.js Viewer Alternatives
PDF Embedder
pdf-embedder
Seamlessly embed PDFs into your content, with customizations and intelligent responsive resizing, and no third-party services or iframes.
Embed Any Document – Embed PDF, Word, PowerPoint and Excel Files
embed-any-document
Embed PDF, DOC, PPT and XLS documents easily on your WordPress website with the help of Google Docs Viewer or Microsoft Office Online.
Embed PDF Viewer
embed-pdf-viewer
Embed a PDF from the Media Library or elsewhere via oEmbed or as a block into an iframe tag.
PDF Poster – Display PDF Files with Custom Viewer
pdf-poster
PDF Poster lets you embed PDF files in WordPress using a responsive viewer and block support, including full-screen, download, and print options.
PDF viewer for Elementor & Gutenberg
pdfjs-viewer-for-elementor
The "PDFjs Viewer for Elementor & Gutenberg" plugin is a powerful tool that allows you to embed PDF files into your Elementor page build …
PDF.js Viewer Developer Profile
1 plugin · 20K total installs
How We Detect PDF.js Viewer
Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.