Manuscript Offprint
arXiv:2610.03383CVE2AP: Automated Generation of PDDL-Encoded Attack Paths via Large Language Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Lin Cui, Vincenzo Scotti, Raffaela Mirandola
KASTEL, Karlsruhe Institute of Technology, Karlsruhe, Germany
lin.cui@kit.edu, vincenzo.scotti@kit.edu, raffaela.mirandola@kit.edu
Abstract—Attack Path (AP) modeling is fundamental to cybersecurity analysis, where the Planning Domain Definition Language (PDDL) has been widely adopted to encode APs into formal and machine-verifiable representations for automated reasoning about vulnerability exploitation, attack progression, and their potential impacts. However, existing AP modeling approaches largely rely on expert-driven manual construction, limiting their scalability and ability to keep pace with rapidly evolving cyber threats. Large language models (LLMs) are promising candidates, as their extensive pre-trained knowledge and reasoning capabilities enable them to interpret and transform threat intelligence into formal representations. In this paper, we propose CVE2AP, an LLM-based approach for automatically generating PDDL-encoded attack paths from natural language CVE (Common Vulnerability Exposure) descriptions. CVE2AP leverages structured prompting and incorporates an error-feedback mechanism that iteratively refines the generated paths using planner-reported syntactic and solvability errors. We conduct a systematic empirical evaluation across multiple LLMs and generation configurations, assessing generation quality across syntactic, solvability and semantic dimensions, together with token consumption and generation time. The results demonstrate that CVE2AP effectively generates high-quality PDDL-encoded attack paths, achieving up to 86.9% syntax correctness, 78.6% solvability, and 93.1% semantic correctness under LLM-as-expert evaluation, while GPT-5.5 offers the best quality-cost trade-off and error feedback yields the most consistent quality improvement.
Index Terms—Automated Generation, Attack Path, PDDL, Semantic Quality
I. INTRODUCTION
Formal and machine-verifiable Attack Path (AP) models provide foundation for cybersecurity analysis by enabling automated reasoning about vulnerability exploitation, attack progression, and their potential impacts [1]. To support such reasoning, the Planning Domain Definition Language (PDDL) [2], originally designed for AI planning, has been adapted for representing attack paths [3]–[9]. By explicitly specifying the required preconditions and effects of every action, PDDL naturally models the causal progression of an attack from the initial vulnerability exposure to the resulting security impact. However, driven by the continuous disclosure of new vulnerabilities, the emergence of sophisticated attack techniques, and the rapid accumulation of cyber threat intelligence, the cyber threat landscape is evolving at an unprecedented pace. This situation requires that attack paths must be continuously and rapidly updated to reflect newly feasible attack strategies and changing attack conditions. As a result, manually constructing and maintaining attack paths can not keep pace with this rapid evolution. It is of urgent need to automate the generation of PDDL-encoded attack paths.
Existing PDDL-based attack path modeling approaches [3], [4], [6]–[8] largely rely on domain experts to manually construct PDDL-encoded attack paths. Creating such planner-ready representations requires translating heterogeneous incomplete, and often implicit cyber threat intelligence into formal PDDL models, demanding expertise in both cybersecurity and AI planning. Consequently, developing and maintaining such models is labor-intensive and difficult to scale. In parallel, recent studies have demonstrated the effectiveness of LLMs in automatically generating general-purpose PDDL domains from natural language inputs [10]–[14]. While these methods substantially reduce the manual effort of planning domain construction, their applicability of PDDL-encoded attack path generation remains largely unexplored. Unlike general planning domains, PDDL-encoded attack paths must satisfy not only syntax correctness and planning solvability, but also cybersecurity-specific semantic requirements including threat model compliance, exploitation mechanism fidelity, attack stage completeness. These observations raise a fundamental research challenge: how can PDDL-encoded attack paths be automatically generated while satisfying syntactic correctness, planning solvability, and cybersecurity-specific semantic requirements?
In this paper, we address this challenge by proposing CVE2AP, an LLM-based approach for automatically generating PDDL-encoded attack paths from CVE descriptions. CVE2AP combines structured prompting with error-feedback mechanism that iteratively refines generated results using planner-reported syntax and solvability errors. We further conduct a systematic empirical study to evaluate the effectiveness as well as token and time costs of CVE2AP across multiple LLMs and generation configurations. In summary, the main contributions of this paper are:
• We propose CVE2AP, an LLM-based approach for automatically generating PDDL-encoded attack paths from natural language CVE descriptions while satisfying both planning surface-level requirements and cybersecurity-specific semantic requirements.
• We investigate generation performance across multiple LLMs and generation configurations, evaluating generation quality using the S3Eval framework [15] from syntactic, solvability, and semantic perspectives, together with token consumption and generation time.
This work was supported by funding from the Helmholtz Association (HGF), topic 46.23 Engineering Secure Systems (KASTEL) and from the HGF pilot program Core Informatics at KIT (KiKIT)
The remainder of this paper is organized as follows. Section II introduces the necessary background. Section III presents the proposed CVE2AP approach. Section IV describes the experimental setup and analyzes the results. Section V discusses related work. Section VI concludes the paper and outlines future research directions.
A. Problem Statement
Formal attack paths provide a machine-processable representation of vulnerability exploitation, attack progression, and resulting security impacts, supporting automated cybersecurity analysis. CVE descriptions contain rich information about vulnerabilities, their exploitation conditions, and security impacts, making them a natural source for deriving attack paths. For example, CVE-2023-6378 describes a serialization vulnerability in the Logback receiver component of Logback 1.4.11 that allows an attacker to mount a denial-of-service attack by sending poisoned data.
CVE-2023-6378. A serialization vulnerability in logback receiver component part of logback version 1.4.11 allows an attacker to mount a Denial-Of-Service attack by sending poisoned data.
This description provides rich information relevant to exploiting the vulnerability, such as the vulnerability characteristics, affected component and version, exploitation mechanism, and intended security impact. However, this information is expressed in natural language and leaves the concrete attack actions and their dependencies implicit. Generating an attack path from a CVE description therefore requires making this implicit attack logic explicit as a feasible sequence of attack actions.
We represent the resulting attack path in PDDL to obtain a formal, planner-ready representation that supports automated verification and reasoning. Formally, given a natural-language CVE description C, the task is to generate a PDDL-encoded attack path that connects the vulnerability to its resulting security impact through a feasible sequence of attack actions. The generated representation must satisfy both formal planning and cybersecurity-specific requirements including syntactic validity, planning solvability, and cybersecurity semantic fidelity.
B. PDDL for Attack Path Modeling
The PDDL [2] is a standard formal language for automated planning. A PDDL domain defines action schemas, each with typed parameters, preconditions that must hold for the action to be applicable, and effects that describing the resulting world state upon the action's execution. A PDDL problem grounds the domain for a concrete scenario by specifying initial states and goals. A domain-independent planner then searches for a plan, i.e., a sequence of grounded actions that transforms the initial state into one satisfying the goal.
In the context of cybersecurity, PDDL has been adapted to model attack paths representing the progression of an attack against a vulnerable system [3], [5], [9]. Each action indicates an operation by attacker, target system, user or infrastructure, with preconditions encoding required capabilities or conditions, and effects capturing the resulting states upon execution. The attack path typically follows stages standardized by the Cyber Kill Chain [16]: starting with Reconnaissance, where system exposures and vulnerabilities are identified, followed by Weaponization and Delivery, during which malicious scripts, files, or payloads to exploit the known vulnerability are crafted and transmitted to the target. This is followed by Exploitation that achieves the exploitation goal with a final impact. The resulting impact can be categorized by the established threat classification framework such as STRIDE [17]: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege.
Figure 1 presents a simplified PDDL-encoded attack path. The first action corresponds to the Reconnaissance stage, identifying that the target system is exposed and accepts external requests. The second action models the Weaponization stage, during which the attacker crafts a malicious payload. Upon execution of step-wise actions, the final steps achieves Denial of service by the successful Exploitation.
;Step 0: Reconnaissance, identify exposed system (:action system-exposes-attack-surface :parameters (?System - system ?Software - software) :precondition (and (runs-vulnerable-software ?System ?Software) (<= (version ?Software) 1001020001) ;version <= 1.1.20.1 (accepts-external-requests ?System)) :effect (and (exposes-attack-surface ?System) (target-accepts-requests ?System)) ;Step 1: Weaponization (:action attacker-crafts-malicious-payload :parameters (?System - system ?Payload - payload) :precondition (exposes-attack-surface ?System) :effect (crafted-payload ?Payload)) ; ... Omitted steps ;Step N: Successful Exploitation (STRIDE impact) (:action attacker-achieves-denial-of-service :parameters (?System - system) :precondition (remote-code-execution ?System) :effect (denial-of-service ?System))
Fig. 1: Simplified example of a PDDL-encoded attack path.
III. METHODOLOGY
This section presents CVE2AP, an LLM-based approach for automatically generating PDDL-encoded attack paths from CVE natural language descriptions. Figure 2 provides an overview. Given a natural-language CVE description, CVE2AP generates a PDDL-encoded attack path as output. The approach is model-agnostic and can be instantiated with any LLM that supports either a chat-based or completion-based interface. The generation process is governed by two complementary components: (i) prompt construction, which provides the LLM

Fig. 2: The overview of the CVE2AP.
with task-specific knowledge and assembles the generation prompt from a system prompt, optional few-shot examples, and an optional output template; and (ii) an optional error feedback mechanism, which automatically validates the generated PDDL using a domain-independent planner and iteratively refines invalid or unsolvable outputs based on the planner's feedback.
A. Model Options
CVE2AP is model-agnostic and can be instantiated with any LLM that supports a chat-based or completion-based interface. To cover diverse deployment scenarios and enable analysis across different model scales, we consider two aspects of model instantiation: (i) deployment mode, including online commercial models accessed through remote APIs and self-hosted models deployed locally, and (ii) model scale, considering multiple model sizes within the same model family to isolate, as far as possible, the effect of model scale on attack-path generation quality. The specific model instances used in our experiments are detailed in Section IV-A.
B. Prompt Construction
CVE2AP supports both structured chat-based interaction, using system-user-assistant messages for instruction-tuned models, and plain completion-based interaction for base models. The appropriate interaction format is automatically selected according to the chosen model. To ensure consistent generation behavior across models, the core prompt content, including the system prompt, task instructions, and few-shot examples, is defined through a common base template and rendered into the corresponding interaction format. The prompt comprises the following components.
System Prompt. The system prompt defines the LLM’s role as an expert in both attack path analysis and PDDL modeling, specifies the generation task, and provides constraints for producing valid attack paths. Specifically, it consists of the following elements:
• Role and Task: Apart from defining the role, the prompt instructs the LLM to generate a syntactically correct, solvable, and semantically valid PDDL-encoded attack path from a given CVE description. When the description is incomplete or ambiguous, it instructs the LLM to make conservative and reasonable assumptions grounded in common security knowledge rather than introducing unsupported capabilities or attack steps.
• Adversarial Model: The prompt constrains the attacker's capabilities to ensure that generated attack path adheres to a realistic model. The attacker's initial position and privilege level are consistent with the CVE's attack context. The attacker has no prior knowledge of or access to system internals, cannot break strong cryptography, and the attack exploits exactly one CVE to achieve exactly one STRIDE goal. The attacker initially holds no capabilities beyond what the authenticated sessions, elevated privileges, crafted artifacts, system internal secrets, and internal network access. The attack path may include user-interaction steps (e.g., clicking a link) when the CVE requires user interaction for exploitation.
• Attack Stage Reference: The prompt provides a reference framework adapted for the Cyber Kill Chain [16], outlining the typical progression of a single-CVE exploitation through five stages: (i) Exposure (mandatory), confirming the target is vulnerable (system technical composition, access paths, absent security controls, and other observable conditions); (ii) Weaponization, crafting or preparing the malicious artifact; (iii) Delivery, transmitting the malicious artifact or trigger to the target; (iv) Exploitation, target-side processing that triggers the vulnerability, often decomposed into multiple actions; (v) Impact (mandatory), achieving a STRIDE security outcome. This reference guides the LLM in structuring the attack path without enforcing a rigid linear progression, as not all vulnerabilities follow this exact sequence.
• Instructions : The prompt provides fine-grained instructions covering six quality dimensions aligned with the evaluation criteria defined in S3Eval [15]:
– Feasibility: Each action must operate within the adversarial model and correspond to a realistic, executable attack operation.
– Atomicity: Each action must represent a single, indivisible real-world attack step with justified effects.
– Completeness: The attack path must be causally coherent with all critical intermediate steps present, progressing logically through attack stages.
– CVE Fidelity: The path must correctly characterize the vulnerability, uses the right exploitation mechanism, and achieve an appropriate STRIDE goal.
– Naming: Action and predicate names must follow readable, descriptive, consistent conventions with clearly identifiable semantics and actors, e.g., attacker, target system, user, infrastructure.
– PDDL Conformance: Rules addressing common LLM errors in PDDL generation, including parameter scoping and predicate arity, identifier uniqueness, predicate block well-formedness, version comparison format, and parameter generalization.
• Output Format: The prompt specifies the expected output structure. A structured PDDL template can optionally be incorporated to provide explicit structural guidance. Details are described in Output Template below.
Listing 1 and Listing 2 respectively illustrate the simplified structure of the system prompt and the corresponding output template
Listing 1: Simplified System Prompt Structure.
[ROLE]
You are an expert in both attack path analysis and Planning Domain Definition Language (PDDL) modeling.
[TASK]
You are given:
- A natural-language CVE vulnerability description
Generate a PDDL-encoded attack path from the given CVE description. Output PDDL only, no explanation.
-
Ensure the attack path is semantically valid, syntactically correct and solvable.
-
When the CVE description is insufficient or ambiguous, make reasonable assumptions based on common security knowledge.
[ADVERSARIAL MODEL]
The attacker's initial position and privilege level are consistent with the CVE's attack context. The attacker has no prior knowledge of or access to system internals, cannot break strong cryptography, and the attack exploits exactly one CVE to achieve exactly one STRIDE goal. ...
The attacker initially holds no predicates from the following capability categories beyond what the CVE's attack context grants (illustrated with example predicate forms):
- credentials or tokens: (has-credentials), ...
...
- internal network access: (has-internal-network-access), ...
[ATTACK STAGE REFERENCE]
Attack paths generally follow stages adapted from the Cyber Kill Chain, adapted to single-CVE exploitation:
-
Exposure (mandatory): ...
-
Weaponization: ...
-
Delivery: ...
-
Exploitation: ...
-
Impact (mandatory): ...
Each stage may require multiple atomic actions. Not all vulnerabilities follow this linear progression. ...
[INSTRUCTIONS]
I1. Threat-Model Compliance. ...
I2. Real-World Executability. ...
...
I18. Version Variable Requirement. ...
[OUTPUT FORMAT]
Output a complete PDDL domain in a Markdown code block (“pddl ...”).
Follow the same structure as the examples above. (few-shot only)
Must include (:requirements :adl :fluents), ...
Following the PDDL template below: <PDDL template> (optional)
[FEW-SHOT EXAMPLES] (few-shot only)
<CVE description, reference PDDL-encoded attack path> pairs
[INPUT]
CVE-XXXX-XXXXX
<CVE natural language description>Listing 2: Simplified Output Template Structure.
(define (domain PDDL-AP-Domain) (:requirements :adl :fluents) (:functions (version ?Software) ...) (:types attacker user target-system infrastructure ...) (:constants CVE_XXXX_XXXXX - CVE-identifier ...) (:predicates (spoofing ?Target - target-system) (tampering ?Target - target-system) (repudiation ?Target - target-system) (information-disclosure ?Target - target-system) (denial-of-service ?Target - target-system) (elevation-of-privilege ?Target - target-system) ...)
;; Step 0: Vulnerability exposure (mandatory entry point) (:action system-exposes-attack-surface-... :parameters (?Target - target-system ...) :precondition (and ...) :effect (and ...))
;; Steps 1 to N-1: Intermediate attack actions (:action actor-verb-description ...)
;; Step N (final): Achieves exactly one STRIDE goal (:action actor-achieves-impact :parameters (?Target - target-system ...) :precondition (and ...) :effect (and (denial-of-service ?Target) ;; or spoofing, tampering, repudiation, ;; information-disclosure, ;; elevation-of-privilege ...)
Few-shot Learning. CVE2AP supports 0-shot, 1-shot, and 2-shot configurations. In the few-shot settings, examples are randomly sampled from a pool of expert-authored reference attack paths, while excluding the target CVE to prevent data leakage. Each example consists of a CVE description paired with its corresponding PDDL-encoded attack path and is presented as a use-assistent message pair. These examples provide the LLM with concrete demonstrations of the expected output structure, action granularity, style, and level of detail, thereby complementing the general constraints specified in the system prompt.
Output Template. In the 0-shot setting, the prompt can optionally include a structured PDDL output template that provides an attack-path-specific domain skeleton. The template specifies the overall PDDL structure including (:requirements), (:types), (:constants), (:predicates), (:functions), and action schema (:action <action-name> :parameter(...), :precondition(...), :effects(...)). It further guides the attack path progression from a mandatory vulnerability exposure action (Step 0) through intermediate exploitation steps to a final action achieving a single STRIDE impact (Step N). This template guides the LLM toward syntactically conformant and domain-appropriate PDDL output without providing CVE-specific content.
C. Error Feedback
A correct attack path should satisfy syntactic correctness, solvability, and semantic correctness [15]. Even with detailed instructions, due to limitations such as hallucinations, and factual inconsistencies [18], LLMs may still generate PDDL domains that contain errors, including invalid declarations or action configurations that do not admit a valid plan. When generating PDDL-encoded attack paths, representative errors include using variables in an action's :precondition or :effect that are not declared in the action's :parameters (parameter scoping violations), or writing negated predicates such as (not (accepts-external-requests ?Sys)) in the (:predicates) construct, whose application is only permitted in action :precondition by PDDL syntax. To mitigate such errors, CVE2AP optionally incorporates an automated error feedback loop focusing on syntactic correctness and solvability, because existing domain-independent PDDL planners, such as Metric-FF planner [19], can quickly and automatically detect these errors and provide concrete error information, such as syntax errors with their locations, which can be directly incorporated into iterative correction. In contrast, although semantic correctness is essential, existing methods [15] evaluating semantics primarily provide semantic quality judgments (i.e., a binary True/False judgment or a score ranging from 0 to 5 reflecting overall semantic quality) rather than feedback that identifies which elements of the generated attack path should be corrected. We therefore leave semantic feedback as an important direction for future work.
Specifically, after the initial generation, a corresponding problem instance is automatically constructed from the domain. Both the domain and problem files are then fed into Metric-FF planner to check syntax correctness and plan solvability. Metric-FF detects syntax errors during its parsing phase and verifies whether a valid plan exists, with support for numeric fluents required for modeling version constraints in vulnerability exploitation. In our implementation, this checking process completes within milliseconds per domain, resulting in negligible overhead to the LLM-based generation process. If the check fails, the specific error messages reported by the planner (e.g., undeclared predicates, type mismatches) are extracted and incorporated into a feedback prompt along with a concise set of common PDDL error correction rules. This resulting feedback is appended to the existing conversation context as a new user message, thereby preserving the generated PDDL and the preceding reasoning context. The LLM is then instructed to produce a revised PDDL domain based on the accumulated context. Listing 3 shows the feedback message template.
This feedback loop allows up to three retry attempts within the same conversation, allowing the LLM to progressively correct errors while maintaining awareness of its prior outputs and the specific issues identified. If the generated PDDL passes the check before exhausting the retry budget, the process terminates early. Otherwise, the procedure terminates after the third retry and returns the final generated output. The entire process is automated and does not require human intervention: the LLM receives only the planner-reported error signals and the predefined correction rules, enabling systematic correction while preserving the original generation context.
Listing 3: Error Feedback Message Template
Metric-ff errors: <planner-reported error message> Fix all errors in the domain. Critical rules: (1) PARAMETER SCOPING: Every ?Var used in preconditions or effects Must appear in that action's :parameters. (2) PDDL IDENTIFIER SYNTAX: Names must use only letters, digits, and hyphens. No dots allowed. (3) DECLARED CONSTANTS ONLY: Every bare identifier (non-?var) must be declared in :constants. ... (6) PREDICATES BLOCK: Never write (not ...) inside :predicates declaration; (not ...) is only valid inside action :precondition. Output corrected PDDL only.
IV. EVALUATION
This section describes experimental setup (Section IV-A), the results (Sections IV-B).
A. Experimental Setup
Our objective is to systematically assess the effectiveness and cost of CVE2AP in generating PDDL-encoded attack paths, and to analyze the impact of key configuration decisions. Accordingly, we address the following research questions:
RQ1: Effectiveness. How effective is CVE2AP at automatically generating PDDL-encoded attack paths?
RQ2: Cost. What is the cost of CVE2AP for generating PDDL-encoded attack paths?
RQ3: Configuration Impact. How do different configuration decisions affect the effectiveness and cost of CVE2AP?
Dataset. We use 21 CVEs applied by S3Eval [15], covering diverse vulnerability types. Each CVE includes a natural language description and expert-authored reference PDDL-encoded attack path.
Generation LLM models. We select five LLM models spanning both online commercial and locally-hosted options at different scales to examine the trade-off between capability and deployment cost.
• Online commercial: GPT-5.5 [20] (latest flagship), and Deepseek (DS) V4-PRO [21].
• Locally-hosted: Qwen3-{4B, 8B, 14B, 32B} [22], which share the same architecture at different scales, enabling analysis of how model capacity affects judgment quality in a cost-effective, self-hosted setting.
Configuration Space. Each generation run is defined by three configuration dimensions:
• Few-shot learning: 0-shot, 1-shot, and 2-shot. Few-shot examples are randomly selected from the reference pool, excluding the target CVE.
• Error feedback: After the initial generation (which proceeds without prior indication of feedback mechanism in the prompt), if the output fails syntax or solvability checks, the specific error messages are fed back to the LLM for up to 3 retry attempts within the same conversation context.
• Output template: For different shot mode, a structured PDDL output template can be provided to guide the generation format. We evaluate both with and without the output template.
In total, the above three dimensions yield prompt configurations per model ( -shot, 1-shot, 2-shot} ). Evaluation Metrics. We evaluate the generated PDDL-encoded attack path using the S3Eval pipeline [15], which comprehensively assess the quality of PDDL-encoded AP through a 3-layer structure:
• S1 (Syntax): Whether the generated PDDL-encoded APs conforms to the PDDL specification, including valid structure, consistent type declaration, correct predicate arities, and well-defined action schemas.
• S2 (Solvability): Whether the domain, together with an automatically generated problem file, admits at least one valid plan, verified by the Metric-ff [19].
• S3 (Semantic): Whether the domain faithfully models the intended attack path. Semantic quality is assessed through embedding-based similarity (Qwen3-Embedding-8B [22]) and LLM-as-expert (Deepseek-R1 [21]), each operating in both intrinsic (candidate vs. CVE natural language description) and extrinsic (candidate vs. expert-authored reference) settings. The LLM-as-expert applies two rubric variants: simplified, which uses concise criterion descriptions to produce a holistic binary judgment (True/False), and detailed, which provides fine-grained instructions with violation examples and scores each criterion on a 0–5 scale (0–2 = violation, 3–5 = compliance), with the minimum score across all criteria deriving a binary signal.
We report the correct rate (proportion of the generations that assessed as correct at each layer) as the primary metric, and the average generation time and token consumption per sample as cost metrics.
Testbed. We conduct all experiments using Python 3.10 on two machines: a macOS laptop equipped with an Intel Core i7-8559U CPU and Intel Iris Plus Graphics 655 (16 GB RAM), and a Linux server equipped with an NVIDIA RTX 4090 GPU (24 GB VRAM, CUDA 13.2) and 62 GB RAM. L Online LLM judges are assessed via API with temperature set to 0, and prompted via chat- or completion-based interfaces depending on model availability. Local models are served via llama.cpp [23] with quantized weights (Q8_0 for Qwen3-{4B, 8B, 14B}, Q4_K_M for Qwen3-32B). We use a fixed random seed of 42 for reproducibility. We note that GPT-5.5 is subject to OpenAI's content safety filter (cyber_policy), which non-deterministically blocks a negligible fraction of the generation of PDDL-encoded attack paths. When this occurs, we retry the generation request until a valid generation is obtained. This issue can also be solved by applying for OpenAI's Research Access Program, which grants exemptions from certain content filters.
B. Results
- RQ1 (Effectiveness): Figure 3 reports the correct rate for each evaluation dimension across syntax, solvability, and semantic quality (embedding-based similarity and LLM-as-expert) of all six LLM models. Each bar indicates the mean correct rate over the 12 prompt configurations.
Overall, CVE2AP is effective in automatically generating high-quality PDDL-encoded attack paths. With the best-performing model, GPT-5.5, CVE2AP achieves a correct rate of 86.9% for syntax, 78.6% for solvability, 53.8% for embedding-based similarity, and 93.1% for LLM-as-expert. Additionally, the performance of locally-hosted models improves consistently with model size across all evaluation dimensions. The weaker performance of smaller local models can be attributed to: (i) limited capability for the multi-constraint reasoning to generate PDDL-encoded attack paths demands; (ii) limited exposure during pre-training to PDDL planning language and cybersecurity, particularly CVE domain knowledge; and (iii) context window limitations. Specifically, few-shot examples, error feedback, the output template increase the input context, which may overwhelm smaller models, such as Qwen3-4B and Qwen3-8B, resulting in empty, ineffective, or malformed outputs. Notably, despite these challenges, Qwen3-32B achieves a syntax correct rate of 39.7%, produces solvable attack paths for approximately one-third of its generations, and satisfies semantic requirements in more than 20% of cases under both embedding-based similarity and LLM-as-expert evaluation. These results are encouraging given the inherent complexity of generating PDDL-encoded attack paths from a CVE description, which demands simultaneously satisfying syntax correctness, solvability, and semantic requirements including action feasibility, action atomicity, and attack stage completeness.

Fig. 3: Overall generation effectiveness across models.
RQ1 Summary: CVE2AP effectively generates PDDL-encoded attack paths that satisfy syntactic correctness (up to 86.9% of generations), solvability (up to 78.6%), and semantic quality (53.8% in embedding-based similarity and 93.1% in LLM-as-expert evaluation)
- RQ2 (Cost): Figure 4 (a) and (b) show the per-sample generation time and token cost, respectively, with box plots showing Q1-median-Q3. Each dot represents the mean cost of generating attack paths for one CVE across all 12 configurations.
For generation time, we make two observations: (i) the per-sample generation time increases monotonically with model size, with the median increasing from approximately 40 s for Qwen3-4B to 215 s for Qwen3-32B, as larger local models require longer time to inference; (ii) the commercial models generate faster on average despite their larger model sizes, with median generation time of approximately 85 s for GPT-5.5, 65 s for Deepseek-V4-Pro. This situation benefits from their optimized serving infrastructures.
For token cost, we have three observations: (i) Qwen3-4B has the lowest token consumption, consuming approximately 10,000 tokens per sample on average, substantially fewer than all other models; (ii) Deepseek-V4-Pro consumes the most (about 53,000 tokens per-generation), which may be attributed to its additional reasoning process and more verbose output style; (iii) the token cost of local Qwen3 models remains relatively stable across different model scales, with the median value ranging from about 32,000 to 34,000.
Overall, GPT-5.5 achieves best quality-cost tradeoff: it outputs highest-quality PDDL-encoded attack paths, while being the fastest commercial model and maintaining the lowest token cost.
RQ2 Summary: CVE2AP achieves a favorable quality-cost tradeoff, with GPT-5.5 providing the highest generation quality, generating fastest among commercial models, and consuming the lowest tokens.
- RQ3 (Configuration Impact): We investigate three configuration dimensions: the number of few-shot examples, error feedback, and the output template. For each dimension, we evaluate its impact on both generation quality (Figures 5–9) and generation cost (Figures 6–10).
Few-shot examples. Figure 5 shows the impact of the number of few-shot examples (0, 1, and 2) on generation quality. Overall, the effect varies across LLM models. For GPT-5.5, the correct rates of solvability and embedding-based similarity increase consistently with the number of few-shot examples. In contrast, the correct rates of syntax and LLM-as-expert are comparable with 0-shot or 2-shot prompting, suggesting that GPT-5.5 derives limited additional benefit from exemplars, as it contains internal knowledge to support high-quality attack-path generation. For the local models, increasing the number of few-shot examples stably benefits Qwen3-14B, whereas {Qwen3-4B, 8B} show no consistent trend. Although exemplars provide useful structural guidance that can partially compensates for internal limited PDDL knowledge, the additional examples substantially extend the input context. Thus, for the smaller models ( ), this increased context my exceed their effective context-processing capacity, resulting in empty, ineffective, or malformed outputs.
Figure 6 shows the cost impact. In general, both generation time and token cost increase monotonically with the number of few-shot examples across the evaluated models, as additional exemplars increase the amount of context processed during generation. The increase is particularly significant for DS-V4-Pro in terms of token consumption, with the 1-shot and 2-shot settings requiring more than twice as many tokens as the 0-shot setting.
Overall, additional few-shot examples do not reliably improve the generation quality across the evaluated models, while consistently increasing the generation cost.
Error feedback. Figure 7 compares generation quality with ('Yes') and without ('No') error feedback. Unlike few-shot examples, whose effects vary substantially across models and evaluation dimensions, error feedback consistently improves generation quality in syntax (up to +49 percentage points), solvability (up to +41 percentage points), and LLM-as-expert

(a) Avg. Time / Sample

(b) Avg. Tokens / Sample
Fig. 4: Per-sample generation cost across models.

(a) S1 Syntax
(b) S2 Solvability
(c) S3 Emb. Similarity
(d) S3 LLM-as-Expert
Fig. 5: Impact of few-shot count on generation quality.

(a) Avg. Time / Sample

(b) Avg. Tokens / Sample
Fig. 6: Impact of few-shot count on generation cost.
semantic evaluation (up to +12 percentage points). In contrast, a slight degradation is observed in embedding-based semantic similarity. These results suggest that error feedback helps LLMs correct syntactic and solvability errors in subsequent retries. The limited improvement in embedding-based semantic quality is expected because the current feedback mechanism targets syntax and solvability errors rather than semantic discrepancies. Future work could incorporate semantic errors into the feedback loop to further improve embedding-based semantic similarity.
Figure 8 reports the corresponding cost impact. Obviously, error feedback consistently increases the per-sample generation time cost and generation token consumptions, because

(a) S1 Syntax
(b) S2 Solvability
(c) S3 Emb. Similarity
(d) S3 LLM-as-Expert
Fig. 7: Impact of error feedback on generation quality.
feedback error message for failed attempt triggers additional retry and require the model to process the extended context.
Overall, error feedback provides a favorable quality-cost trade-off, substantially improving generation quality at a relatively modest additional cost.
Structured output template. Figure 9 compares the generation quality with ('Yes') and without ('No') the output template. The impact of the output template varies across models and evaluation dimensions. Overall, the template provides limited benefits, improve the correct rate of solvability by approximately 1–5 percentage points across models. The improvement can be attributed to that the template guides LLMs toward outputs that conform to the required PDDL structure. However, for the weaker local models in the Qwen3 series, the additional instructions introduced by the template increase prompt complexity and may make it more difficult to follow the required constraints, resulting in more incorrect outputs in syntax and semantic evaluation.
Figure 10 shows that the output template generally increases per-sample generation time and token consumption, with some variations across models. Overall, the output template provides limited and model-dependent quality benefits while incurring additional generation costs.
RQ3 Summary: Error feedback is the most consistently beneficial configuration, while the effects of few-shot examples and output templates vary across models.
V. RELATED WORK
A. PDDL-based Attack Path Modeling
AI planning provides a formal framework for modeling multi-step cyber attacks by representing attack actions as planning operators with explicit preconditions and effects. Among existing planning formalisms, the PDDL has been widely adopted for this purpose. Roberts et al. [3] demonstrated the use of PDDL for personalized vulnerability analysis by encoding attack actions as PDDL schemas and incorporating user activities and system-specific configurations to automatically identify paths targeting to a specific system. Falco et al. [6] formulated adversarial strategy generation for critical infrastructures as an AI planning problem. More recently, Bashir et al. [7] integrated PDDL-based attack graphs with fault trees to support resilience analysis of cyber-physical systems, while Inayat et al. [8] modeled cyber attacks in PDDL to generate attack steps, and recommend security controls.
As attack scenario evolve increasingly complex, prior work has also investigated the scalability and maintainability of PDDL models. PDDLAssistant [5] supports the incremental development of PDDL-encoded attack graphs by reconciling different versions of PDDL representations and explaining changes between generated plans. Wang et al. [24] improved the efficiency of PDDL-based attack planning in large-scale networks through a device reachability graph partitioning approach. Despite these efforts, most existing approaches assume that PDDL attack models are manually constructed. In practice, this construction process is labor-intensive and requires expertise in both cyber security and AI planning to specify predicates, action schemas, and their corresponding preconditions and effects. This modeling burden becomes particularly significant as vulnerabilities, attack techniques, system and environmental conditions continuously evolve.
To reduce this modeling effort, Bezawada et al. [9] proposed to automatically derive PDDL attack paths from CVE description using traditional NLP techniques, including Part-Of-Speech (POS) tagging and rule-based extraction. However, the reliance on handcrafted extraction rules limits the approach's ability to capture the diverse linguistic expressions and incomplete, implicit and heterogeneous information commonly contained in vulnerability descriptions and threat intelligence. Furthermore, the approach was evaluated only on a limited case study without systematic evaluation across multiple important quality metrics, such as syntax correctness, solvability, semantic correctness.
Overall, existing research has established PDDL as an effective formalism for representing multi-step cyber attacks, while automatic construction of high-quality, planner-ready PDDL attack paths remains unexplored. In particular, generating attack-specific PDDL representations from unstructured vulnerability descriptions remains challenging because the generated actions must satisfy not only the formal planning constraints and cybersecurity-specific semantic

(a) Avg. Time / Sample

(b) Avg. Tokens / Sample
Fig. 8: Impact of error feedback on generation cost.

(a) S1 Syntax
(b) S2 Solvability
(c) S3 Emb. Similarity
(d) S3 LLM-as-Expert
Fig. 9: Impact of output template on generation quality.

(a) Avg. Time / Sample

(b) Avg. Tokens / Sample
Fig. 10: Impact of output template on generation cost.
requirements, such as faithful representation of vulnerability exploitation mechanisms, and logically complete attack progression. Our work addresses this gap by leveraging LLMs to automate the construction of PDDL-encoded attack paths from CVE descriptions and systematically evaluating their syntactic correctness, solvability, and semantic correctness.
B. LLM-based PDDL Domain Generation
Recent advances in LLMs have enabled automatic generation of PDDL planning domains from natural language descriptions. Guan et al. [10] investigated the use of pre-trained LLMs for PDDL domain construction, demonstrating the potential of LLMs to translate natural-language descriptions into formal planning representations. Smirnov et al. [11] further improved the generation quality by incorporating automatic consistency checking and reachability analysis into an iterative refinement loop. Oswald et al. [12] and Huang et al. [13] systematically evaluated the ability of LLMs to generate PDDL domains from natural-language descriptions, highlighting both their potential and remaining challenges in producing semantically correct and executable planning domains. More recently, Huang et al. [14] proposed a fully automated pipeline that leverages multiple LLMs to convert natural-language, step-wise action descriptions into candidate PDDL specifications. These candidates are ranked by embedding-based semantic similarity and further filtered through planner-based solvability checking to identify suitable PDDL domains.
Despite these advances, existing LLM-based approaches primarily target general-purpose planning domains and provide limited consideration of cybersecurity-specific attack-path modeling. Unlike general planning domains, attack path modeling introduces additional domain-specific semantic requirements beyond syntax correctness and planning solvability. Generated attack actions must, for example, accurately reflect the vulnerability's exploitation mechanism, and preserve the causal dependencies required for a complete attack progression. These requirements introduce a fundamental distinction between a PDDL domain that is formally valid and solvable and one that faithfully represents a real-world cyber attack.
Our work investigates the application of LLMs to automatically generate PDDL-encoded attack paths from CVE descriptions. To assess the resulting attack paths beyond formal PDDL correctness, we employ S3Eval [15] to evaluate three complementary dimensions: syntactic correctness, solvability, and semantic correctness. This allows us to investigate whether LLM-generated PDDL representations are not only planner-executable but also faithful to the underlying vulnerability-exploiting-specific semantics.
VI. Conclusion
The rapid evolution of the cyber threat landscape has rendered the manual construction and maintenance of PDDL-encoded attack paths impractical, making automated attack path generation imperative. This paper introduced CVE2AP, an LLM-based approach for automatic generation of PDDL-encoded attack paths from natural language CVE descriptions. By combining specifically designed structured prompting with an iterative, domain-independent planner-guided error-feedback mechanism, CVE2AP improves the syntactic correctness and planning solvability of generated attack paths while preserving their semantic quality. Our systematic evaluation applying S3Eval [15] framework across diverse LLMs and generation configurations demonstrates that CVE2AP is capable of generating high-quality PDDL-encoded attack paths with reasonable generation time and token consumption. The results further reveal substantial differences in the quality-cost profiles of the evaluated LLMs, with GPT-5.5 providing the best generation performance and the most favorable quality-cost trade-off. Furthermore, configuration analysis shows that error feedback is the most consistently effective strategy for improving generation quality, whereas the benefits of few-shot examples and structured output templates diverse. These findings highlight the importance of jointly considering model capability, generation cost, and configuration strategy when deploying LLM-based methodology to generate PDDL-encoded attack paths. Despite these encouraging results, the current implementation of CVE2AP focuses on attack paths involving the exploitation of a single vulnerability. As future work, we plan to extend the approach to support the generation of multi-vulnerability attack paths and chained exploitations.
VII. DATA AVAILABILITY
The replication package, including the source code, experimental data, and scripts required to reproduce our experiments, is publicly available at https://github.com/LincuiDudu/pddl-ap-generation.
REFERENCES
[1] O. Sheyner, J. Haines, S. Jha, R. Lippmann, and J. M. Wing, “Automated generation and analysis of attack graphs,” in Proceedings 2002 IEEE Symposium on Security and Privacy. IEEE, 2002, pp. 273–284.
[2] C. Aeronautiques et al., “Pddl—the planning domain definition language,” Technical Report, Tech. Rep., 1998.
[3] M. Roberts, A. Howe, I. Ray, M. Urbanska, Z. S. Byrne, and J. M. Weidert, “Personalized vulnerability analysis through automated planning,” in Working Notes for the 2011 IJCAI Workshop on Intelligent Security (SecArt), vol. 50, 2011.
[4] J. L. Obes, C. Sarraute, and G. Richarte, “Attack planning in the real world,” arXiv preprint arXiv:1306.4044, 2013.
[5] K. Tiwary, S. Weerawardhana, I. Ray, and A. Howe, “Pddlassistant: A tool for assisting construction and maintenance of attack graphs using pddl,” in Proceedings of the ACM Conference on Computer and Communications Security (CCS 2017), 2017.
[6] G. Falco, A. Viswanathan, C. Caldera, and H. Shrobe, “A master attack methodology for an ai-based automated attack planner for smart cities,” IEEE Access, vol. 6, pp. 48360–48373, 2018.
[7] S. K. Bashir, R. Podder, S. Sreedharan, I. Ray, and I. Ray, “Resiliency graphs: Modelling the interplay between cyber attacks and system failures through ai planning,” in 2024 IEEE 6th International Conference on Trust, Privacy and Security in Intelligent Systems, and Applications (TPS-ISA). IEEE, 2024, pp. 292–302.
[8] A. Inayat, M. Saueressig, M. F. Franco, E. J. Scheid, and L. Z. Granville, “Employing pddl plan to recommend security controls against cyberattacks,” in International Conference on Advanced Information Networking and Applications. Springer, 2025, pp. 367–379.
[9] B. Bezawada, I. Ray, and K. Tiwary, “Agbuilder: an ai tool for automated attack graph building, analysis, and refinement,” in IFIP Annual Conference on Data and Applications Security and Privacy. Springer, 2019, pp. 23–42.
[10] L. Guan, K. Valmeekam, S. Sreedharan, and S. Kambhampati, "Leveraging pre-trained large language models to construct and utilize world models for model-based task planning," Advances in Neural Information Processing Systems, vol. 36, pp. 79081–79094, 2023.
[11] P. Smirnov, F. Joublin, A. Ceravola, and M. Gienger, “Generating consistent pddl domains with large language models,” arXiv preprint arXiv:2404.07751, 2024.
[12] J. Oswald, K. Srinivas, H. Kokel, J. Lee, M. Katz, and S. Sohrabi, "Large language models as planning domain generators," in Proceedings of the International Conference on Automated Planning and Scheduling, vol. 34, 2024, pp. 423–431.
[13] C. Huang and L. Zhang, “On the limit of language models as planning formalizers,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 4880–4904.
[14] S. Huang, N. Lipovetzky, and T. Cohn, “Planning in the dark: Llm-symbolic planning pipeline without experts,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 39, no. 25, 2025, pp. 26542–26550.
[15] L. Cui, V. Scotti, and R. Mirandola, “S3Eval: A three-layer pipeline for automated evaluation of PDDL-encoded attack paths,” in 4th International Workshop on Artificial Intelligence for Autonomous Computing Systems (AI4AS), ACSOS 2026, Cesena, Italy, Sep. 2026, to appear.
[16] E. M. Hutchins, M. J. Cloppert, R. M. Amin et al., “Intelligence-driven computer network defense informed by analysis of adversary campaigns and intrusion kill chains,” Leading Issues in Information Warfare & Security Research, vol. 1, no. 1, p. 80, 2011.
[17] A. Shostack, Threat modeling: Designing for security. John wiley & sons, 2014.
[18] J. Gu et al., “A survey on LLM-as-a-judge,” The Innovation, vol. 7, no. 6, Jun. 2026. [Online]. Available: https://doi.org/10.1016/j.xinn.2025.101253
[19] J. Hoffmann, “The metric-ff planning system: Translating “ignoring delete lists” to numeric state variables,” Journal of artificial intelligence
research, vol. 20, pp. 291–341, 2003.
[20] OpenAI, “Introducing gpt-5.5,” https://openai.com/index/introducing-gpt-5-5/, 2026, accessed: 2026-06-17.
[21] D. Guo et al., “Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning,” arXiv preprint arXiv:2501.12948, 2025.
[22] Y. Zhang et al., “Qwen3 embedding: Advancing text embedding and reranking through foundation models,” arXiv preprint arXiv:2506.05176, 2025.
[23] G. Gerganov, “llama.cpp: Llm inference in c/c++,” 2023, accessed: 2026-07-26. [Online]. Available: https://github.com/ggml-org/llama.cpp
[24] Z. Wang, Y. Zhang, Z. Liu, X. Wei, Y. Chen, and B. Wang, “An automatic planning-based attack path discovery approach from it to ot networks,” Security and Communication Networks, vol. 2021, no. 1, p. 1444182, 2021.