The skill is vulnerable to arbitrary code execution, SSRF
Claims to do
@json-render/react-pdf: React PDF renderer that generates PDF documents from JSON specs using `@react-pdf/renderer`.
Actually does
This skill is a Node.js library that processes a JSON specification (`Spec`) to generate PDF documents. It utilizes `@react-pdf/renderer` to output PDFs as an in-memory buffer, a readable stream, or directly to a file. It can potentially access external image URLs if specified within the JSON `Spec` for image components.
The skill allows defining custom React components via `defineRegistry`. If an attacker can inject malicious JSX/JavaScript into these definitions, it could lead to arbitrary code execution within the PDF rendering environment.
const { registry } = defineRegistry(catalog, { components: { Badge: ({ props }) => (<View style={{ backgroundColor: props.color ?? "#e5e7eb", padding: 4 }}><Text>{props.label}</Text></View>), }, });The `Image` component can fetch content from arbitrary URLs. An attacker could craft a malicious PDF specification to force the rendering server to make requests to internal network resources or exfiltrate data to an external server.
| Image | Image from URL or base64 |
Maliciously crafted PDF specifications, especially those leveraging complex custom components or deeply nested structures, could lead to excessive CPU, memory, or disk usage, potentially causing a denial of service.
const spec: Spec = { ... }; defineCatalog(...); defineRegistry(...);The `Link` component allows embedding hyperlinks with arbitrary `href` values in the generated PDF. This could be used for social engineering or phishing attacks against the PDF viewer, though it does not directly impact the rendering server.
| Link | Hyperlink with text and href |
[](https://mondoo.com/ai-agent-security/skills/github/vercel-labs/json-render/react-pdf)<a href="https://mondoo.com/ai-agent-security/skills/github/vercel-labs/json-render/react-pdf"><img src="https://mondoo.com/ai-agent-security/api/badge/github/vercel-labs/json-render/react-pdf.svg" alt="Mondoo Skill Check" /></a>https://mondoo.com/ai-agent-security/api/badge/github/vercel-labs/json-render/react-pdf.svgSkills can read files, run commands, and access credentials. Mondoo helps organizations manage the security risks of AI agent skills across their entire fleet.